Mình có đoạn code này bên C++, mong các bạn giúp mình chuyển nó qua C# để mình dùng DllImport chuyển vào 1 hàm trong file DLL
Mã:
typedef void (CALLBACK * VideoCaptureCB_Ptr)(PVOID pContext, BYTE * apData[3], VideoSampleInfo_T * pVSI);
typedef struct _VideoSampleInfo_T
{
ULONG idFormat; //
ULONG lSignalState;
int nLen; // not used for raw video data(e.g. YUV420)
int nWidth;
int nHeight;
int anPitchs[3]; // only used for raw video data(e.g. YUV420)
ULONG dwMicrosecsPerFrame; // 1000*1000/FPS
ULONG field;
int iSerial;
} VideoSampleInfo_T;
Đây là hàm trong file DLL
Mã:
RegisterVideoPreviewCB(HANDLE hChannel, PVOID pContext, VideoCaptureCB_Ptr pCB);
Mình sẽ dùng DllImport gọi hàm này ko C#, với VideoCaptureCB_Ptr được chuyển từ C++ sang C# bên trên
View more random threads:
Pallet nhựa Lâm Đồng giải pháp hoàn hảo cho nhà kho Pallet nhựa Lâm Đồng là một giải pháp đa năng và hiệu quả trong việc vận chuyển và lưu trữ hàng hóa. Trong đó, pallet nhựa Lâm Đồng không chỉ đáp...
Pallet nhựa Lâm Đồng giải pháp...