I just wanted to ask a simple question here:

when we load the dll in our program using LoadLibrary is it shared system wide i.e can another application

get my function in the dll using GetProcAddress ??

If not then how do i share my dll system wide such that when my dll is loaded by my application all the

process currenly running can directly access and they dont need to load it first to access it :confused:

Also how can i get the process-id of a currently running process other than mine??

Thankx for reading :grin:
Posted on 2004-05-24 07:52:48 by telophase
Use the following registry key:


Windows NT\CurrentVersion\Windows\AppInit_DLLs
The value for this key might contain a single DLL filename or a set of DLL filenames (separated by spaces or commas)

Posted on 2004-05-24 08:10:34 by Opcode
Originally posted by telophase
Also how can i get the process-id of a currently running process other than mine??
Use the Search button of this forum :grin:

Posted on 2004-05-24 08:12:48 by Opcode
But that means that i will have to do it via the registry :(

No other alternative that you can think of??

And i can get address using getmodulehandle right??

But will the system have to restart to do this or can i do it without ending the current session?
Posted on 2004-05-24 08:23:28 by telophase
Yes, there are other methods.

They are listed in the book
Programming applications for Microsoft Windows from Jeffrey Richter.
and are more methods that you can find using Google.

And unfortunately you will need to reboot to use this registry trick.

Posted on 2004-05-24 09:02:30 by Opcode
I added a shortcut to the Masm GUI menu to point to my batch file so that i can get the dll directly from

the menu itself but when i compile it that way i get only the .obj file and i cant seem to get the .lib and .dll

files. Please take a look:

\masm32\bin\ml /c /coff /Cp %1.asm

Link /DLL /DEF:%1.def /SUBSYSTEM:WINDOWS /LIBPATH:f:\masm32\lib %1.obj

del %1.exp

Posted on 2004-05-24 09:10:40 by telophase
If i am using LoadLibraryA to load a DLL and if i dont unload it using UnloadLibrary then will that

library be resident in the memory till the machine shut's down or restarts??
Posted on 2004-05-24 09:31:19 by telophase