首先,请注意本手册没有说明64位兼容性.dll有一个C接口,所以你将加载一个已编译的函数库。
就数据类型而言,short int只是短的,uchar是BYTE(除非参数是splatted,在这种情况下它是char *)。
对于那些返回uchar的函数,我不完全确定,但看起来这是一个简单的错误枚举,所以你可能最好把它留在BYTE。
如果这些函数中的任何一个返回指针(我没有看到任何),那会使事情变得复杂。他们明确声明他们使用stdcall调用约定,但他们没有说他们是否在抑制名称修改,所以你可能会
必须为导出的函数名称转换一下。
例如,I2CRead可以是简单的I2CRead,也可以是_I2CRead@8.-SHAWN-
以上来自于谷歌翻译
以下为原文
First off, note that the manual doesn't say anything about 64-bit compatibility.
The dll has a C interface, so you'll be loading a compiled function library. As far as data types go, short int is just short, uchar is BYTE (unless the parameter is splatted, in which case it's char *). For those functions that return uchar, I'm not entirely sure but it looks like this is a simple error enum, so you're probably best off to leave it at BYTE. If any of these functions return pointers (I didn't see any), that complicates matters a bit.
They explicitly state that they use the stdcall calling convention, but they don't say if they're suppressing name-mangling so you might have to cast around a bit for the exported function name. For instance, I2CRead may be simple I2CRead, or it may be _I2CRead@8.
-SHAWN-
首先,请注意本手册没有说明64位兼容性.dll有一个C接口,所以你将加载一个已编译的函数库。
就数据类型而言,short int只是短的,uchar是BYTE(除非参数是splatted,在这种情况下它是char *)。
对于那些返回uchar的函数,我不完全确定,但看起来这是一个简单的错误枚举,所以你可能最好把它留在BYTE。
如果这些函数中的任何一个返回指针(我没有看到任何),那会使事情变得复杂。他们明确声明他们使用stdcall调用约定,但他们没有说他们是否在抑制名称修改,所以你可能会
必须为导出的函数名称转换一下。
例如,I2CRead可以是简单的I2CRead,也可以是_I2CRead@8.-SHAWN-
以上来自于谷歌翻译
以下为原文
First off, note that the manual doesn't say anything about 64-bit compatibility.
The dll has a C interface, so you'll be loading a compiled function library. As far as data types go, short int is just short, uchar is BYTE (unless the parameter is splatted, in which case it's char *). For those functions that return uchar, I'm not entirely sure but it looks like this is a simple error enum, so you're probably best off to leave it at BYTE. If any of these functions return pointers (I didn't see any), that complicates matters a bit.
They explicitly state that they use the stdcall calling convention, but they don't say if they're suppressing name-mangling so you might have to cast around a bit for the exported function name. For instance, I2CRead may be simple I2CRead, or it may be _I2CRead@8.
-SHAWN-
举报