Believe or not, here in my job we still use Pentiums I's at 200-266 Mhz with Win 95. So all the programs i make are in win32 asm. I have one question about image lib, I've noticed it uses ole32 dll's, with CoXXXXXXX imports. I guess that all those API's creates an overhead (the program i make using imagelib it's a little slow when it load a jpg), so my question is:

I can use imagelib withOUT those CoXXXXXX API calls to improve speed / memory usage?.

Greets and thanks.

ps: thanks for imagelib.
Posted on 2002-04-13 09:52:45 by r00t

Ernie's lib uses COM therefore it needs to be initialized (you need to tell windows that you're using COM) ergo you need to use those calls
Posted on 2002-04-13 11:23:01 by Hiroshimator
Probably the best and simplest way to improve the speed of ImageLib is to handle the initialzation and closure of the COM dll's yourself.

Imagelib was meant to supply people who don't know COM with some simple to use wrappers for the image loading API. To this end (SIMPLE) I have the lib assume the COM dlls need to be initialized before it begins work, and to clean these up afterwards. It explicitedly calls CoInitialize and CoUninitialize every time it is used.

Since calls to initialize the dlls may be nested, with only the outside init/uninit pair actually doing anything, a programmer may have a better idea when to load and unload them (such as at program start and at end, or just during an update routine).

To init the dll, just "Invoke CoInitialize, NULL" To uninit, call "Invoke CoUninitialize"
Posted on 2002-04-13 17:40:22 by Ernie