????c#????c++????????????????д
????[DllImport("UCamer.dll"?? CallingConvention = CallingConvention.Winapi)]
????public extern static void Disp_Destroy(IntPtr hShow);
????DllImport??????????UCamer.dll??????dll??·??????dll??????????е????????c:windows/sytem32??
????CallingConvention ??????c#????c++???? ?????? msdn????????

??????????????Winapi??????????????????ù????? ??thisCall???c++?????÷????? ???? ???????????????Winapi???????
????c#????dll???????????????????
????http://wenku.baidu.com/link?url=SihlxtHC-HMcEhq3izpd2bux8rNaKOMTpu8NPqjdYlLSwYSV1CqNJdVbxkaZm7OqaaSTEK-KUJqX5jbtkdpnUZ_38No4tsrgqCsf7Th5dqK
??????????????????????c++??c#???????????????????????????????????
????1??????????????£???????????????????????????? ??c++?е?????????char[] ?????????char[] ????κθ??
????c++??char????????assic??????c#?е?char?2??????????????????vs?в???????
??????????????????????????????????磬?????д?????????????????
????????????? ??char[] ???c#?е?byte[] ??????Encoding.Assic.getstring?????????
????2?????????c++???е???? ??c#????Intptr ????????????????緵???Intptr????????????c#???????????????????????????
????Marshal.Copy();
????Marshal????c#????????й??????????й????????????????unsafe?? Marshal??copy?????????????????????16??????????????????????????????
????msdn?ж???????????????

 

???????????????ù????????????в????????????????

 

//??????????????С?????
myContext = new VlcControlWpfRendererContext(width?? height?? System.Windows.Media.PixelFormats.Bgr24);
//???????????????
myBitmapSectionPointer = Win32Interop.CreateFileMapping(new IntPtr(-1)?? IntPtr.Zero?? Win32Interop.PageAccess.ReadWrite?? 0?? myContext.Size?? null);
//???????????????
map = Win32Interop.MapViewOfFile(myBitmapSectionPointer?? Win32Interop.FileMapAccess.AllAccess?? 0?? 0?? (uint)myContext.Size);
//??????????????????????
Win32Interop.CopyMemory(map?? data?? myContext.Size);
//?????????е???????????
myBitmap = (InteropBitmap)Imaging.CreateBitmapSourceFromMemorySection(myBitmapSectionPointer?? myContext.Width?? myContext.Height?? myContext.PixelFormat?? myContext.Stride?? 0);

??????????????????????  ??????Щapi????
???????Intptr??????????Int??Int??c#?к?Int32????????????????????Long??int??c#?ж???int?????????Щ ?????????????c++?е????????????????????
????3??c++?е???????  ??c#?е????
????????c++?ж???????????
????typedef VOID (WINAPI *PUSERCALL)( PUCHAR pData?? ULONG Length?? PVOID pUserData );
???????c#?е?????????
????public delegate void PUSERCALL(IntPtr pData?? uint Length?? UInt32 pUserData);