F
flyerer1
Unregistered / Unconfirmed
GUEST, unregistred user!
以下是一个vc的一个数组声明和函数的调用,在delphi如何写?
unsigned int Para[3]={0x01FF,0x0a,0x1}; //共12个字节
其中Parameter[0] 0x01FF为固定的命令字节
1. BOOL Device_Write_CPP(PVOID,DWORD)
if (!Device_Write_CPP(Para,12))
{
AfxMessageBox("失败","Write fail!"
return false;
}
2. BOOL Device_Read_CPP(PVOID,DWORD)
if( !Device_Read_CPP(dataValue,4096) // dataValue为 unsigned short int类型的数组,不能为unsigned int类型
{
AfxMessageBox("失败","Read fail!"
return false;
}
unsigned int Para[3]={0x01FF,0x0a,0x1}; //共12个字节
其中Parameter[0] 0x01FF为固定的命令字节
1. BOOL Device_Write_CPP(PVOID,DWORD)
if (!Device_Write_CPP(Para,12))
{
AfxMessageBox("失败","Write fail!"
return false;
}
2. BOOL Device_Read_CPP(PVOID,DWORD)
if( !Device_Read_CPP(dataValue,4096) // dataValue为 unsigned short int类型的数组,不能为unsigned int类型
{
AfxMessageBox("失败","Read fail!"
return false;
}