lawson_whitney@juno.com wrote:
Now the question: How to load built-in dll without resolving its imports?
Where's the harm in resolving the imports of the builtin?
In this case, the app has already loaded and used oleaut32 before it gets around to asking about its version.
If the dll already loaded, then there is no harm at all. But if not, there is huge penalty in performance and memory usage. Take into account that currently built-in dlls are never unloaded. In the case of oleaut32, ole32 and advapi32 also will be loaded. If an application doesn't use them, but simply does query its version, there is more harm, than the good.
I tried this patch, and unreverted the GetFileVersionInfo(Size) patch, but juno still isn't happy. With the native dll present, the app asks for its version info and gets the builtin. The ver trace looks a little strange to me - maybe it will make sense to you?
About.exe returns the builtin oleaut32 version, but _only_ if the native oleaut32 is present (if I move it away, About.exe gets size 0), and only if it is given the native dll's filename. Give it the builtin filename and it gets size 0. I think the latter is probably not a problem, but it seems strange to me.
Strange, I tested my patch with About.exe and it worked for me.
You could try replace version.rc by the following version resource, and to see if it will help (even better try to use both and report the result):
oleaut32.dll from the original win95:
FILEVERSION 2,10,3024,1 PRODUCTVERSION 2,10,3024,1 FILEFLAGSMASK 0x3F FILEFLAGS 0x0 FILEOS VOS_NT | VOS__WINDOWS32 FILETYPE VFT_DLL FILESUBTYPE 0x0 { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "CompanyName", "Microsoft Corporation" VALUE "FileDescription", "Microsoft OLE 2.1 for Windows NT(TM) Operating System" VALUE "FileVersion", "2.1" VALUE "InternalName", "OLEAUT32.DLL" VALUE "LegalCopyright", "Copyright c Microsoft Corp. 1993-1995." VALUE "LegalTrademarks", "MicrosoftR is a registered trademark of Microsoft Corporation. Windows NT(TM) is a trademark of Microsoft Corporation." VALUE "ProductName", "Microsoft OLE 2.1 for Windows NT(TM) Operating System" VALUE "ProductVersion", "2.1" VALUE "Comments", "Microsoft OLE 2.1 for Windows NT(TM) Operating System" } } BLOCK "VarFileInfo" { VALUE "Translation", 0x409, 1252 } }
oleaut32.dll from the win2000 SP1:
FILEVERSION 2,40,4514,1 PRODUCTVERSION 2,40,4514,1 FILEFLAGSMASK 0x3F FILEFLAGS VS_FF_PRERELEASE FILEOS VOS_NT | VOS__WINDOWS32 FILETYPE VFT_DLL FILESUBTYPE 0x0 { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "CompanyName", "Microsoft Corporation" VALUE "FileVersion", "2.40.4514" VALUE "InternalName", "OLEAUT32.DLL" VALUE "LegalCopyright", "Copyright c Microsoft Corp. 1993-1998." VALUE "ProductVersion", "2.40.4514" } } BLOCK "VarFileInfo" { VALUE "Translation", 0x409, 1252 } }