I'm analyzing a DLL using dumpbin and came across the following entry in its imports section:
oledlg.dll
10273CD0 Import Address Table
102FB5B0 Import Name Table
0 time date stamp
0 Index of first forwarder reference
3 OleUIBusyW
I want to remove the dependency of oledlg.dll from my application.
These are the libs in Linker -> Input:
Rpcrt4.lib;msi.lib;shlwapi.lib;Advapi32.lib;odbc32.lib;odbccp32.lib;Version.lib;
I found out oledlg.dll in DelayLoadDLLs section of my vcxproj. I removed it from there and rebuilt the DLL, but i still see it in /imports.
I added /VERBOSE:LIB in my Linker command line and it printed the following information:
5> Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86\Imm32.Lib:
5> Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86\WinMM.Lib:
5> Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86\oledlg.lib:
5> Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86\urlmon.lib:
5> Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86\msxml6.lib:
I also searched the "OleUIBusyW" but i don't see it being called anywhere. This dependency on oledlg.dll is causing my application to not work on Windows Server Core since oledlg.dll is not shipped with Server Core.
I'm analyzing a DLL using dumpbin and came across the following entry in its imports section:
oledlg.dll
10273CD0 Import Address Table
102FB5B0 Import Name Table
0 time date stamp
0 Index of first forwarder reference
3 OleUIBusyW
I want to remove the dependency of oledlg.dll from my application.
These are the libs in Linker -> Input:
Rpcrt4.lib;msi.lib;shlwapi.lib;Advapi32.lib;odbc32.lib;odbccp32.lib;Version.lib;
I found out oledlg.dll in DelayLoadDLLs section of my vcxproj. I removed it from there and rebuilt the DLL, but i still see it in /imports.
I added /VERBOSE:LIB in my Linker command line and it printed the following information:
5> Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86\Imm32.Lib:
5> Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86\WinMM.Lib:
5> Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86\oledlg.lib:
5> Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86\urlmon.lib:
5> Searching C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86\msxml6.lib:
I also searched the "OleUIBusyW" but i don't see it being called anywhere. This dependency on oledlg.dll is causing my application to not work on Windows Server Core since oledlg.dll is not shipped with Server Core.
Share Improve this question edited 7 hours ago Gh0st asked 7 hours ago Gh0stGh0st 11 bronze badge New contributor Gh0st is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 1- You need to go back to the Server Core documentation, to check which features are not available, as it is quite a restricted system. – OldBoy Commented 7 hours ago
1 Answer
Reset to default 0Set Project Properties -> Linker -> Optimization -> References -> Yes (/OPT:REF)
This prevents the explicit dependency on oledlg.dll even when not being used.