// DllCExample2.cpp : // #include "conio.h" #include "stdio.h" #include "stdafx.h" #include "DelcomDLL.h" //include this file and add DelcomDLL.lib to the project int main(int argc, char* argv[]) { signed char c =0; DWORD Result; char DeviceName[MaxDeviceLen]; HANDLE hUsb; printf("Delcom DLL Test Example.\n"); Result = DelcomGetNthDevice(USBIODS, 0, DeviceName); if(!Result) { printf("Device Not Found.\n"); return(0);} printf("%s.\n",DeviceName); hUsb = DelcomOpenDevice(DeviceName,0); // open device DelcomWritePorts(hUsb,0,c); DelcomCloseDevice(hUsb); // close device return(0); }