Is there an image library such as Ernest Murphy's in dll form?
Posted on 2005-12-09 22:09:26 by mikes
Yes if you want to write one using his functions.
Posted on 2005-12-09 23:32:10 by hutch--

Yes if you want to write one using his functions.

I think he could have figured that out for himself. He wants to know if anyone already has one.
Posted on 2005-12-10 00:17:47 by SpooK

Is there an image library such as Ernest Murphy's in dll form?


It should not be difficult for you to code the DLL containing the routines of Ernest Murphy.
Posted on 2005-12-10 02:36:16 by Vortex

I think he could have figured that out for himself. He wants to know if anyone already has one.

The next question would have been "How do you write the DLL". The link below shows how its done.


hutch at movsd dot com
Posted on 2005-12-10 03:00:29 by hutch--
mikes, just be sure to use one of the fixed versions of Ernie's image library; see
Posted on 2005-12-10 09:10:47 by f0dder
Many thanks for all of the help and suggestions.

I downloaded from the link Hutch provided, and made the dll work.

It appears that this download has the older buggy files.

Not knowing how to use MASM (i'm a FASM user), I don't know how the batch file works.

I downloaded various newer versions of BitmapFromFile.asm etc. but don't know where to put them so that the new dll will have the latest stuff.

In desperation, I renamed all copies of BitmapFromFile.asm so that masm couldn't find any and give an error. It never made an error.

I just need a dll of Ernest Murphy's Image Library (with all of the bug fixes). Could someone please help.
Posted on 2005-12-10 18:06:25 by mikes
If you don't have MASM set up then just use the DLL that is at the link I posted above, it already has the fixed versions of Ernie Murphy's procedures in it.
Posted on 2005-12-10 22:40:01 by hutch--
Thanks again Hutch.

The way it "blows up" is similar to the descriptions I have read on this forum describing known bugs.

It works on 3-5 BitmapFromMemorys and then gives system errors.

I have not seen any problem with BitmapFromFile as yet.

It is really a neat dll, but is not usable with the problems. I had the impression that several people had eliminated the bugs.
Posted on 2005-12-10 23:18:07 by mikes
I ran DepandencyWalker on the file and found 3 errors.

The first was a missing dll (efsadu.dll)

I downloaded this dll and 2 errors went away.

No it says "Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module."

This appears to be mpr.dll

I have no idea what theses dlls do.

I will try again with efsadu.dll installed.


Installing efsadu.dll did not help things.
Posted on 2005-12-10 23:42:32 by mikes

There is something wrong with what you have reported, below is the complete exports and imports in the DLL. I don't know where the extra DLLs you have mentioned have come from or hoe they are related to the known DLL in the import section of the DLL.

Exp Addr Hint  Ord Export Name by murphy.dll - Sat Dec 10 19:53:17 2005
-------- ---- ----- ---------------------------------------------------------
00001010    0    1 BitmapFromFile
000010E2    1    2 BitmapFromMemory
00001190    2    3 BitmapFromPicture
00001320    3    4 BitmapFromResource

Imp Addr Hint Import Name from gdi32.dll - Not Bound
-------- ---- ---------------------------------------------------------------
00002000  22 CreateCompatibleDC
00002004  48 DeleteDC
00002008  4B DeleteObject
0000200C  AA GetDeviceCaps
00002010  12E SelectObject
00002014  21 CreateCompatibleBitmap

Imp Addr Hint Import Name from user32.dll - Not Bound
-------- ---- ---------------------------------------------------------------
0000205C  ED GetDC
00002060  1D3 ReleaseDC

Imp Addr Hint Import Name from kernel32.dll - Not Bound
-------- ---- ---------------------------------------------------------------
0000201C  1C6 MulDiv
00002020  25F SizeofResource
00002024  1B7 LockResource
00002028  1C7 MultiByteToWideChar
0000202C  23C SetLastError
00002030  2BF lstrlenA
00002034  A2 FindResourceA
00002038  1A9 LoadResource

Imp Addr Hint Import Name from ole32.dll - Not Bound
-------- ---- ---------------------------------------------------------------
00002040  6B CreateStreamOnHGlobal
00002044  55 CoTaskMemFree
00002048  54 CoTaskMemAlloc

Imp Addr Hint Import Name from oleaut32.dll - Not Bound
-------- ---- ---------------------------------------------------------------
00002050  2B OleLoadPicturePath
00002054  27 OleLoadPicture
Posted on 2005-12-11 06:03:04 by hutch--
hutch--, the dependency walker probably walks through the imported DLLs too, and has trouble with delay-load images... that would explain the behaviour.

mikes, you shouldn't go off downloading DLLs like that. The two DLLs you mention are system DLLs, and you're pretty lucky if downloaded copies haven't been trojanized.
Posted on 2005-12-11 10:15:46 by f0dder
Thanks again for all of the help (esp Hutch).

It is now working perfectly on both XP and 98.

I re-downloaded the file that Hutch provided yesterday and used the dll that came with it without running the batch file.

Running DependencyWalker on this file renders:

1010, 10e2, 1190, and 1320 for the entry points. (It still gives the warning I mentioned earlier)

If I execute the batch file, it produces a dll with 100c,10c0,158, and 12b8.

My question is where are the files that the batch process uses? Obviously my system has some old "Murphy" files.

I would really like to know this because I have the MASM source to an XYPlot that I would like very much to make into a dll.

Posted on 2005-12-11 15:32:21 by mikes

You may have the older versions on your machine. I made sure I built the DLL using the fixed versions of Ernie Murphy's procedures. What I would suggest is to actually convert the 4 procedures directly to FASM so that you can build either the DLL or an EXE using the procedures directly with FASM. Some of the guys who worked on fixing the 4 procedures are FASM users so they may be able to help you doing the conversion.
Posted on 2005-12-11 17:36:29 by hutch--
Where does the make process you provided assume the files are?

I renamed every file on the machine to try and force an error, and no error occured.

Thanks again for you help. The Image library using your dll is excellent, not to speak of compact.
Posted on 2005-12-11 18:05:13 by mikes
The way MASM32 is set up, it works like this. Both the include files and libraries are written at the beginning of the asm file and the 4 procedures that Ernie Murphy wrote that were fixed are contained within the MASM32 library. The actual assembler code is no more than the barest shell of a DLL and the way the masm32 library procedures are included in the DLL is by adding their names into the DEF file which forces the linker to include the library module code as well.

I have included the new versions of the procedures in the masm32 beta version 9.00 which you can get at URL

The DLL example that was posted earlier assumes it is on the same partition as the masm32 installation and it should build correctly from there.

Now with the X Y Plotter code you have in MASM, be aware that masm code can be built in a number of ways and it may be done differently to how the default projects work in masm32 so you may need to write a batch file or similar to ensure it builds correctly. If you have any problems doing this, there are a lot of people around who know how to build most things in MASM. Depending on how the project is written, it may not be a big deal to port it to FASM either.


hutch at movsd dot com
Posted on 2005-12-11 19:19:55 by hutch--

You have been very helpful, and I appreciate it.

It looks like my MASM download is Do I install version 9.00 on top of it or do I delete the old version first?

and the 4 procedures that Ernie Murphy wrote that were fixed are contained within the MASM32 library

Aren't .lib files collections of .obj files like in C? If so, do you assemble the 4 Murphy files and build the .lib file?

The XYPlot pgm I was talking about was written by a fellow from the Isle Of Man who did not know how to make a dll.

It appears to be written in MASM.

If someone can convert this to a .dll I would appreciate it, otherwise I will try it myself.

I would think that the XYPlot in the form of a dll would be useful to many people, just as the ImageLib should be.

The reason I am using FASM instead of MASM is that I am using it as a backend for my BASIC compiler and it is much smaller.
Posted on 2005-12-11 20:23:46 by mikes

Remove the old installation or rename it if you have anything useful in it and install the new one. Put the "murphy" file in a directory on the same partition as the installation and it should build directly from the batch file.

FASM is a good choice for a basic back end as it is fast enough and small enough.

If you are going to convert the MASM exe to a DLL, you will have to make sure all of the prototypes as well as the procedures are done properly then make sure you export the procedures that need to be available to the DLL caller. This is done in the DEF file. There is a DLL skeleton script in the default editor in masm32 that you can use as a framework to move the stuff in the EXE into.
Posted on 2005-12-12 02:50:28 by hutch--