Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio vspdctl.dll的64位版本_Visual Studio_Dll_64 Bit_Platform_Virtual Serial Port - Fatal编程技术网

Visual studio vspdctl.dll的64位版本

Visual studio vspdctl.dll的64位版本,visual-studio,dll,64-bit,platform,virtual-serial-port,Visual Studio,Dll,64 Bit,Platform,Virtual Serial Port,我正在VS2013上创建一个应用程序,它使用vspdctl.dll创建虚拟串行端口对。此虚拟端口用于与PC上运行的其他应用程序通信 当我使用Platform=win32配置编译/链接时,已成功创建.exe文件,并且虚拟端口创建工作正常。 注意:我的机器是x64 当我更改platform=x64时,我的exe将再次创建,没有任何问题,但仍然无法加载dll。我觉得vspdctl.dll是一个32位的库 但我打算在代码中使用其他64位库,这就是为什么我还希望在64位应用程序中实现vspdctl.dll

我正在VS2013上创建一个应用程序,它使用vspdctl.dll创建虚拟串行端口对。此虚拟端口用于与PC上运行的其他应用程序通信

当我使用Platform=win32配置编译/链接时,已成功创建.exe文件,并且虚拟端口创建工作正常。 注意:我的机器是x64

当我更改platform=x64时,我的exe将再次创建,没有任何问题,但仍然无法加载dll。我觉得vspdctl.dll是一个32位的库

但我打算在代码中使用其他64位库,这就是为什么我还希望在64位应用程序中实现vspdctl.dll。是否有vspdctl.dll的64位版本,或者如何在64位应用程序中实现32位dll

任何帮助都将不胜感激。 谢谢

下面是我加载dll的CreateVSPair函数的代码

char CreateVSPair(char *Port1, char *Port2) {
OSVERSIONINFO VersionInfo;
HINSTANCE libInst;
libInst = LoadLibrary(L"C:\\AK47 Data\\Softwares\\SP monitor\\vspdctl.dll");
if (!libInst)
{
    libInst = LoadLibrary(L"C:\Windows\SysWOW64\\vspdctl.dll");
    if (!libInst)
        return -10; /* Couldn't load library */
}
/* Substitute the typedefs above for functions other than CreatePairFn */
std::string s("CreatePair");
CreatePairFn CreatePair = (CreatePairFn)GetProcAddress(libInst, s.c_str());
if (CreatePair == 0) return -20; /* Couldn`t find function */
bool returnvalue = CreatePair(Port1, Port2); /* For example, Port1 = "COM5" and Port2 = "COM6" */
FreeLibrary(libInst);
return returnvalue;

})

有我以前没有注意到的vspdctl64.dll可用。

使用属性错误处理,调用GetLastError()获取LoadLibrary()失败的原因。你好,我在QT-prj中添加了这个dll库,找到了symol“CreatePair”,但不能使它成为
bool-CreateVSPair(char*Port1,char*Port2){QLibrary-lib(“libs\\vspdctl.dll”);lib.load();if(!lib.isLoaded())qDebug()