我的C++翻译的delphi代码对吗?(50分)

  • 主题发起人 主题发起人 johny8209
  • 开始时间 开始时间
J

johny8209

Unregistered / Unconfirmed
GUEST, unregistred user!
C++代码:
DEFINE_GUID(CLSID_PvCallBackRender,
0x838619d6, 0xff83, 0x11d5, 0xb4, 0xce, 0x0, 0x50, 0xba, 0xe3, 0xde, 0x6d);
//__PvCallBack__ GUID
// {FF00A620-FF8A-11d5-B4CE-0050BAE3DE6D}
DEFINE_GUID(IID_IPvCallBackRender,
0xff00a620, 0xff8a, 0x11d5, 0xb4, 0xce, 0x0, 0x50, 0xba, 0xe3, 0xde, 0x6d);
typedef HRESULT (CALLBACK* PV_CallBackProc)(BYTE *pImgBuffer, BYTE *pVdoSrc, LPVOID lpParameter);
DECLARE_INTERFACE_(IPvCallBackRender, IUnknown)
{
STDMETHOD (SetCallBackFunction)
(
PV_CallBackProc PvCallBackProc,
LPVOID lpParameter //Specifies a single parameter value passed to the callback
) PURE;
STDMETHOD (SendVideoParam)(HANDLE hVideoArriveEvent, LPVOID lpParameter) PURE;
STDMETHOD (GetVideoParam)(PBYTE *pbyData,
BYTE *byVdoCounter,LPVOID *lpParameter) PURE;
};
delphi代码
Const
CLSID_PvCallBackRender:TGUID = (D1:$838619D6;D2:$FF83;D3:$11D5;D4:($B4,$CE,$00,$50,$BA,$E3,$DE,$6D));
IID_IPvCallBackRender :TGUID = (D1:$FF00A620;D2:$FF8A;D3:$11D5;D4:($B4,$CE,$00,$50,$BA,$E3,$DE,$6D));
Type
TPV_CallBackProc=Function(pImgBuffer,pVdoSrc:PByte;lpParameter:Pointer):BOOL of object;
IPvCallBackRender = interface(IUnknown)
['{FF00A620-FF8A-11d5-B4CE-0050BAE3DE6D}']
(** IPvCallBackRender methods **)
Function SetCallBackFunction(PvCallBackProc:TPV_CallBackProc;lpParameter:Pointer): HResult;
stdcall;
Function SendVideoParam(hVideoArriveEvent:THandle;lpParameter:Pointer):HResult;stdcall;
Function GetVideoParam(pbyData:PByte;byVdoCounter:Byte;lpParameter:Pointer):HResult;stdcall;
end;
 
有没有人啊
 
基本上是對的。
 
接受答案了.
 
后退
顶部