0
votes

I have a problem with registration dll file.

I copied test.dll file to C:\Windows\SysWOW64 and C:\Windows\System32 directories.

I tried to register using the 32-bit version regsvr32.exe:

C:\Windows\SysWOW64> c:\Windows\SysWOW64\regsvr32.exe C:\Windows\SysWOW64\test.dll

And using the 64-bit version regsvr32.exe:

C:\Windows\System32> c:\Windows\System32\regsvr32.exe C:\Windows\System32\test.dll

In both cases, an error occurs: The module "C:\Windows\SysWOW64(or System32)\test.dll" may not compatible with the version of WIndows that you're running. Check if the module is compatible with an x84 (32-bit) or x64 (64-bit) version of regsvr32.exe.

I check test.dll dependencies:
- C:\windows\system32\KERNEL32.DLL
- C:\windows\system32\USER32.DLL
- C:\windows\system32\ADVAPI32.DLL
- .........
- C:\windows\system32\JVM.DLL

The last dll (JVM.DLL) I copied from C:\Program Files\Java\jre1.8.0_60\bin\server to C:\windows\system32, because my test.dll using jvm.dll.

I tried to do as it is written here, but without result...

Help me please.

1
Do not copy your files into system32 folder nut store them in an own folder.Totonga
I Tried - does not help. The same error.Evgen Palash
You'll have to make up your mind first whether this is a 32-bit or a 64-bit executable file. It cannot be both. And then you need to ensure that you copy the correct flavor of any DLLs it needs. Murphy's law dictates that this is actually a 32-bit executable and you copied the 64-bit version of jvm.dll. So it cannot work either way :)Hans Passant

1 Answers

0
votes

I would not copy the dlls into system path but store them in an own folder.

You can use dependency walker to check the dependencies bitnesses of your dlls and its dependencies. Dependency walker will add a small 64 to the icon of the dll. There is no mixture allowed. Either its 64 or it is 32 bit.

Does the bitness of test.dll match the bitness of jvm.dll.

In additional you can use dependency walker to load regsvr32.exe and use Profile->Start Profiling to see which dlls from which path are choosen during registering your control.

I would assume that is not possible to just copy jvm.dll but you need to add it to the path because it as additional dependencies. Dependency walker would show this too.