0

当我尝试运行以下代码时:

[DllImport("scardsyn.dll")] 
public static int SCardCLGetUID(int ulHandleCard, byte[] pucUID, int ulUIDBufLen, ref int pulnByteUID);

我收到以下错误:

'Star.ModWinsCard.SCardCLGetUID(int, byte[], int, ref int)' must declare a body because it is not marked abstract, extern, or partial 

任何帮助都将不胜感激。

4

1 回答 1

3

它在消息中,您必须将您的方法标记为extern

[DllImport("scardsyn.dll")] 
public static extern int SCardCLGetUID(int ulHandleCard, byte[] pucUID, int ulUIDBufLen, ref int pulnByteUID);
于 2013-02-19T09:18:24.060 回答