|
|
#1 |
|
Junior Member
Join Date: Mar 2007
Posts: 3
|
Detect if Dll is wrong version
Hi,
I have a software that depends on dbghelp.dll to work properly. I've found out that on previous operating system, that dll wasn't available (Win98). So I've written a routine that see if the dll is available and if it's not, it download it from my server and put it in the installation direction. The problem I have run into is that on Windows 2000, the debghelp.com is there but do not support the MiniDumpWriteDump function. How can I verify if that function is supported so that I can download the dll if it's not? Here's how I detect if the dll is available: System::Call 'kernel32::LoadLibrary(t "dbghelp.dll") i .r1' IntCmp $1 0 NoFoundIt NoFoundIt FoundIt Can anyone help me? Thanks, Karl |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2004
Location: Germany, Paderborn
Posts: 177
|
code: |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Mar 2004
Location: Germany, Paderborn
Posts: 177
|
CheckFileVersionUpToDate is the main macro
If you do not know where the DLL is located you could search PATH directories, but I would not recommend this. But if this is a legacy DLL (no COM) then I would perhaps check if it is installed in the default location (probably SYSDIR) and install your DLL in INSTALLDIR. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Mar 2007
Posts: 3
|
Thanks for your suggestion,
Here's how I ended solving my problem... After calling LoadLibrary, I call: System::Call "kernel32::GetModuleHandle(t 'dbghelp.dll') i .s" System::Call "kernel32::GetProcAddress(i s, t 'MiniDumpWriteDump') i .r2" The I do IntCmp $2 0 NoFoundIt NoFoundIt DbgDone If the ProcAddress is not found, I know this is the wrong version of DbgHelp that is on that operating system. Regard, Karl |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|