I have generated a test Plugin using prep2015x64.cmd.
prep2015x64.cmd
contents are given below
echo off & setlocal enableextensions enabledelayedexpansion
set _FB_GEN="Visual Studio 14 Win64"
call "%~d0%~p0\common.cmd" %*
if %errorlevel% == 2 exit /b 1
call "%~d0%~p0\winprep.cmd"
The Plugin is completely generated, and to ensure it is 64 bit, I cross checked it with dumpbin /Headers and it gives that DLL is 64 bit
FILE HEADER VALUES
8664 machine (x64)
9 number of sections
56DFCDF9 time date stamp Wed Mar 9 12:47:13 2016
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
2022 characteristics
Executable
Application can handle large (>2GB) addresses
DLL
Then, I try to register it, using an elevated Command Prompt in C:\Windows\SysWOW64. I use the following command for registration
C:\Windows\SysWOW64> C:\Windows\SysWOW64\regsvr32.exe C:\workspace\firebreath\build\bin\TestPlugin\Release\TestPlugin.dll
It gives me an error:
The Module "C:\workspace\firebreath\build\bin\TestPlugin\Release\TestPlugin.dll"
may not be compatible with version of Windows that you are running.
Check if the module is compatible with an X86(32-bit) or X64(64-bit) version of regsvr32.exe
I am using Windows 7, 64 Bit Operating System, so I am really confused as to what is going wrong here. Is it the plugin generation or something else. Is there any alternate way to get the Plugin registered.
Thanks in advance.
Here's what I did to get it working. I used Visual Studio 2008.
I was not sure of whether it gets linked with 32 bit libraries or 64 bit libraries. So, I explicitly added "Additional Dependencies" in Linker Input with the following below list
"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\Kernel32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\User32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\Gdi32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\WinSpool.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\Shell32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\Ole32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\OleAut32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\Uuid.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\ComDlg32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\AdvAPI32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\Psapi.lib" "....\ActiveXCore\Debug\ActiveXCore.lib" "....\PluginCore\Debug\PluginCore.lib" "PluginAuto\Debug\PPL_PluginAuto.lib" "....\NpapiCore\Debug\NpapiCore.lib" "....\ScriptingCore\Debug\ScriptingCore.lib" "....\boost\libs\thread\Debug\boost_thread.lib" "....\boost\libs\system\Debug\boost_system.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\WinInet.lib"
Changed the "Target Machine" in Linker Advanced from "Not Set" to "MachineX64(/MACHINE:X64)"