I am working on a database of API functions by DLL version in order to verify compatibility with a given OS version or API DLL version. What I need is a list of DLL's and exports for all versions of Windows. I am looking for people to run this gathering application on their machine and zip/email me the file it creates. It only takes a couple of seconds to run and scans your system folder for DLLs and dumps the export table to the file along with Windows version and IE version numbers.

It does not matter if I get repeats of some OS versions as different service packs etc... will have many different DLL versions. If I get too many of one version I will post here that I no longer need it.

I have included the source code though there is not much of interest in it.

Please ZIP the file before sending it.

Thanks in advance...
Posted on 2004-03-26 23:56:23 by donkey
Hi donkey,

It crashes on my pc in PEReadHeader :

mov eax,
cmp W,"MZ"

pMapFile is null.
Posted on 2004-03-27 01:39:11 by Dr. Manhattan

Hi donkey,

It crashes on my pc in PEReadHeader :

mov eax,
cmp W,"MZ"

pMapFile is null.


Hi Dr. Manhattan,

What OS version are you using ?
Posted on 2004-03-27 09:23:09 by donkey
Hi All,

I believe I have a good enough sampling of Windows 2000 SP4. I need Win95, WinME and NT4 especially. Also versions of IE other than 6 would be great as it would give me the common controls API. I am thinking of rolling back my configuration but other sources would be very useful.
Posted on 2004-03-27 10:22:29 by donkey
I'll send it from 95b with IE 5.01/SP2 (I think), when I crank it up later today... :grin:
Posted on 2004-03-27 14:04:50 by S/390
I use Windows 2000 SP4 5.00.21 95
Posted on 2004-03-27 15:30:24 by Dr. Manhattan

I use Windows 2000 SP4 5.00.21 95


That's very strange, I have around 8 dumps of exactly that OS version with a large selection of different configurations (it is also the one I use). The program checks to see if it can open the file before it tries to map it so I should never get to a point where I try to read from a zero pointer. This executable checks the return from MapFile in order to make sure that it was properly mapped...

I have not included the source but the only difference is in the ScanSystemFolder procedure, I have added the following:

invoke MapFile,
or eax,eax
js >.FileDone


Executable only :
Posted on 2004-03-27 16:12:50 by donkey
why map it tho, why not just openfile (readonly, file share), getfilesize, virtualalloc, process it, virtualfree, might be safer for dll's in use etc
Posted on 2004-03-27 17:14:01 by evlncrn8
Jumping around the file while resolving RVAs is a pain with a file pointer. The memory mapped file is about the only way that you can do it without adding a huge level of complexity to the program. For example when you follow an RVA you must first load the IMAGE_IMPORT_DESCRIPTOR from the section then find the offset to the name, jump to that, read the name, jump back and read the next inport descriptor. With a MMF it is simple, playing with file pointers is a bit much and would slow things down appreciably. Mapping a file to memory should not be any different than opening it, if I am able to open it with read/share access (as I do) then mapping it should have been no more than a file management trick. I have to examine the memory mapped files alot closer to see what it effects that I am not aware of.
Posted on 2004-03-27 17:22:23 by donkey
The file that was causing the crash was c:\winnt\system32\rnaph.dll. I don't know why but its size is 0k. In this case, MapViewOfFile returns an error (invalid handle). The new exe works fine, I sent you the result.
Posted on 2004-03-28 01:52:56 by Dr. Manhattan
Thanks Dr. Manhattan,

Weird that the file was not mapped, I geuss Windows refuses to map a 0K file as it would be useless as a memory mapped object. A good lesson and very useful to know, the really dumb thing is that I built error checking into the MapFile proc and returned -1 if it could not map the file, I should have verified the return value in any case, in the future I won't neglect that check. Thanks for your time and effort :alright:
Posted on 2004-03-28 02:01:14 by donkey
It crashes on processing MSSIP32.dll on my win98se
Posted on 2004-03-31 05:47:35 by Vaxon
Hi donkey !
I am not sure where I read an article in MSDN, but I remember, mapping a file with size 0 will alway failed, so we must call GetFileSize to detect the empty file and refuse to map.
Best regards
Posted on 2004-03-31 09:25:31 by TQN
It's in the PlatformSDK description of CreateFileMapping:

An attempt to map a file with a length of zero in this manner fails with an error code of ERROR_FILE_INVALID. Applications should test for files with a length of zero and reject such files.


- and it makes sense: file mappings are not growable, so a 0-byte file mapping is sorta useless.
Posted on 2004-03-31 09:45:39 by f0dder
The second EXE that I posted should take care of any errors in the file mapping.
Posted on 2004-03-31 10:04:35 by donkey