Home > Net >  How the c interface can be converted into c #???
How the c interface can be converted into c #???

Time:11-18

The following is a c + + interface documentation to, how to use c # statement?
 
Short USER_API dc_SamAReadCardInfo (HANDLE icdev,
The int type,
Int * text_len,
Unsigned char * text,
Int * photo_len,
Unsigned char * photo,
Int * fingerprint_len,
Unsigned char * fingerprint,
Int * extra_len,
Unsigned char * extra
)

This is myself, I can't, the program directly stuck out
[DllImport (" dcrf32. DLL)]
Private static extern short dc_SamAReadCardInfo (
IntPtr handle,
The int type,
The out int text_len,
The out byte [] text,
The out int photo_len,
The out byte [] photo,
The out int fingerprint_len,
The out byte [] fingerprint,
The out int extra_len,
Extra out byte []);

CodePudding user response:

Public static extern short dc_SamAReadCardInfo (System. IntPtr icdev, int type, ref int text_len, System. IntPtr text, ref int photo_len, System. IntPtr photo, ref int fingerprint_len, System. IntPtr fingerprint, ref int extra_len, System. IntPtr extra);

CodePudding user response:

The above is ok, another way stupid you are not sure all with Intptr * how to write
  •  Tags:  
  • C#
  • Related