我已经通过隐式调用dll方法通过了程序的调试. 现在想通过动态加载的方法调用dll. 但是不能打开设备, 请高手指点: 我用的代码如下: typedef HANDLE (WINAPI *DllFunction)(long iIndex ); hinstDLL=NULL; hinstDLL=LoadLibrary("CH341DLL.dll"); if (hinstDLL) { DllFunction CH341OpenDevice; CH341OpenDevice = (DllFunction)GetProcAddress (hinstDLL,"CH341OpenDevice"); if(CH341OpenDevice(mIndex) == INVALID_HANDLE_VALUE) { m_open = false; } else m_open = true;
} FreeLibrary(hinstDLL);