Question

I wrote a activeX plugin and made a cab file to package the ocx with 2 dll file, just calling then a.dll and b.dll. The ocx relys on the a.dll and a.dll relys on b.dll. The inf file is this:

[version]
signature="$CHICAGO$"
AdvancedINF=2.0  

[Add.Code]
test.ocx=test.ocx
a.dll=a.dll
b.dll=b.dll

[test.ocx]
file-win32-x86=thiscab
clsid={AB1408A0-10F6-40BA-984D-074D7BDC3126}
FileVersion=3,1,0,17
DestDir=11
RegisterServer=yes

[a.dll]
file-win32-x86=thiscab
FileVersion=2,1,1,16
DestDir=11

[b.dll]
file-win32-x86=thiscab
FileVersion=2,0,0,16
DestDir=11

After the downloading done, I found the a.dll doesn't exist in C:/windows/system32 but other two files were already in it and the ocx were already registered.

a.dll was wroted by myself. b.dll is a third-party library.

I was so puzzled by this, and eager for your help.

Was it helpful?

Solution

Try removing DestDir=11, so nothing goes into system32 folder. Your dependency DLL files will be placed in the same folder as your OCX. Also, you may be missing CRT DLLs (MSVC*.DLL). I would suggest switching to link to CRT statically in your C++ project settings. Check if any of your DLLs has any unresolved dependencies on the target machine, using Dependency Walker.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top