0
編譯我有以下的C函數的PInvoke DLL中的函數用C
typedef struct ekeycore_ctx_ ekeycore_ctx;
typedef struct ekeycore_enum_ ekeycore_enum;
typedef struct ekeycore_device_ {
char *serial;
char *portname;
char *node;
BOOL present;
BOOL used;
} ekeycore_device;
typedef struct ekeycore_simple_ ekeycore_simple;
typedef enum {
EKEYCORE_OK = 0, /* everything was fine */
EKEYCORE_NOMEM = 1, /* out of memory */
EKEYCORE_NODEVICE = 2, /* no devices are available */
EKEYCORE_TIMEOUT = 3, /* key did not respond to request */
EKEYCORE_FAULTY = 4, /* device has reported faulty/attacked */
EKEYCORE_UNKNOWN = 5 /* unknown error */
} ekeycore_result;
EKEYCORE_API ekeycore_result ekeycore_simple_get(ekeycore_simple *ctx, unsigned char *buff, size_t buffz)
我需要調用從C#這個函數(ekeycore_simple_get),我將如何做呢?上面的變量類型將如何轉換?
'ekeycore_simple_get'接受指向'ekeycore_simple'的指針,但不提供此結構的定義。 – Constantin 2010-07-28 14:59:26