Click to See Complete Forum and Search --> : Dll Version


Laurent VOISIN
October 17th, 2001, 03:56 AM
Hi,

Just a simple question :

I have developped a Dll in visual C++ 6 And I would to show the Dll Version in my About windows of my VB project.

So, What I search is an API to get the Dll version.

I tried to search in the french version of msdn without success.

Thanks in advance,
Laurent VOISIN.

Paul Ch
October 17th, 2001, 04:25 AM
The following windows API calls would give you the version number of your DLL

GetFileVersionInfoSize()
GetFileVersionInfo()

Hope this helps

Laurent VOISIN
October 22nd, 2001, 03:35 AM
Hi,

Thank you for response, it work fine.

I would like now to find the version of a Dll in memory.

The system information viewer show me the version of certain Dll, So I would like to know how it is done ?

Thank you in advance,
Laurent.

Paul Ch
October 22nd, 2001, 10:11 AM
The only way I think you may be able to manage this is by getting the path to the dll from the list of dlls loaded by the process. However, I have no idea how easy this would be using VB. If you understand C++ then there is an article for finding which processes are locking a given DLL it should be possible to use this code to find which DLLs are loaded into memory and then get their path and filename to get the version.

http://codeguru.earthweb.com/dll/WhoSLocking.html




Hope this helps