F
flyerer1
Unregistered / Unconfirmed
GUEST, unregistred user!
用delphi如何写?// 调用SendDataToHW函数的C语言例子如下: typedef int (WINAPI *PROC)(long,long,long);//注意一定要定义为WINAPI形式, 否则会出错。 PROC SendDataToHW; HINSTANCE hinstLib=LoadLibrary("HWSendData.dll"); if(hinstLib!=NULL) { SendDataToHW=(PROC)GetProcAddress(hinstLib,"SendDataToHW"); if(SendDataToHW!=NULL) { ((SendDataToHW)(1,0,1)); int data=0; while(data<1000) { ((SendDataToHW)(data,0,3));//Send channel A data data++; Sleep(50); } ((SendDataToHW)(1,0,2));//Stop channel A for(int i=0;i<10;i++) ((SendDataToHW)(data,0,3)); FreeLibrary(hinstLib); } }