如何翻译此C++ API function 到 VB?
C/C++ code:
typedef unsigned short MFSTATUS; // known as a WORD - 16 bits for sure MIFAREAPI_API MFSTATUS MIFAREAPICC MF_ReadCardBlock( DWORD dwBlkAdr, DWORD dwRdrKey, DWORD dwKeyAB, DWORD dwRspBufSz, BYTE *pRspBuf );
我的转换:
VB.NET code:
Declare Function MF_ReadCard Lib "MifareAPI.dll" Alias "MF_ReadCardBlock" (ByVal BlkAdr As Long, ByVal RdrKey As Long, ByVal KeyAB As Long, ByVal BuffSize As Long, ByRef buffer As Byte()) As Short
API 接口程序
C/C++ code:
MIFAREAPI_API MFSTATUS MIFAREAPICC MF_ReadCardBlock( DWORD dwBlkAdr, DWORD dwRdrKey, DWORD dwKeyAB, DWORD dwRspBufSz, BYTE *pRspBuf );
我的转换是否正确?
我用的是VB Studio 9,新手来着, 不知道怎么调用API啊
所以我问这个是不是对的。
如果转换为这样
<DllImport("MifareAPI.dll")> _
Private Shared Function MF_ReadCard ( _
ByVal dwBlkAdr As Integer, _
ByVal dwRdrKey As Integer, _
ByVal dwKeyAB As Integer, _
ByVal dwRspBufSz As Integ
相关问答:
如题,C/C++中的execl怎么调用写好的java程序,
execl("/opt/java1.5/bin/java","MyClass",NULL);
这样的不行哦。
不会.
运行java程序
找工具查看一下那个程序的命令行
搜索下:jni ......
为什么我用form.show和form.hide多次连接了两个窗口只能互换链接两次啊?
代码看看
照道理form.show 没次数限定的吧
我也快疯了。
楼主知道怎么发贴么?
引用
我也快疯了。
楼主知道怎么发贴么?
楼主也 ......
Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' 打开刚创建的文件。
ReDim MyString(LOF(1) - 1)
Put #1, , MyRecord ' 读入所有字符到变量中 ......
怎么把已知的数据保存成xml文件,现在已知的数据是
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o=& ......
问题:
现在Access数据库中有两张表TableA和TableB
TableA中有记录如下:
字段1(Name) 字段2(Num)
A 3
A 4
B 6
... ......