0

How to invoke this method in C# ( it's an method in WD_SDK.dll, it's C++ ) ?

WD_RegisterVideoPreviewCB(HANDLE hChannel, PVOID pContext, VideoCaptureCB_Ptr pCB);
user2877989
  • 587
  • 1
  • 6
  • 19
  • According to [this](http://social.msdn.microsoft.com/Forums/vstudio/en-US/e232f033-704e-4ee9-aa4e-e7d2a8491207/c-program-to-call-c-class-in-dll?forum=csharpgeneral), it's not possible but he also suggested a work-around. – Nathan Mar 19 '14 at 15:57
  • @Nath, what do you mean? That function neither takes nor returns STL containers. – Frédéric Hamidi Mar 19 '14 at 15:59
  • @FrédéricHamidi I guess I missed that. Thanks for the correction. – Nathan Mar 19 '14 at 16:00
  • Most likely those would all be `IntPtr`, but you really need to check the API. – Rotem Mar 19 '14 at 16:56

1 Answers1

-1

use this

 [DllImport("yourdll.dll", EntryPoint = "WD_RegisterVideoPreviewCB")]
 public static extern void (HANDLE hChannel, PVOID pContext, VideoCaptureCB_Ptr pCB);