Re: System-wide hooking, VB+ASM



J French,

> Just thinking out loud, the DLL must be capable of initializing the
> run time itself, as one can use a VB DLL happily from another
> language, my guess is that is done by the LibMain routine

It can? According to a link someone posted the other day, the key to calling
exports from a VB DLL is to perform a couple of tricks when loading the DLL:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=54682&lngWId=1

I was having a little problem with some test code though. I really would
like to see a small demo that installs a WH_KEYBOARD hook and crashes when a
key is hit in another project.

> I can't quite get my head around the initialization sequence, but I am
> certain that LibMain is called both on normal LoadLibrary and when it
> is being mapped into another process. I've seen that in Delphi.

I was wondering about that as well. It's not clear to me if Sub Main in a
DLL corresponds to a call to LibMain or what exactly.

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm


.



Relevant Pages

  • Re: Calling a matlab dll in java
    ... you mention about putting a -nojvm option when initializing the dll ... When initializing the dll library '-nojvm' option must ... all compiler and linker options in VS took me a while, ... JNIEXPORT void JNICALL Java_JNITest_JNITest_initializeApplication ...
    (comp.soft-sys.matlab)
  • Re: System-wide hooking, VB+ASM
    ... the DLL must be capable of initializing the ... I'm also pretty sure that I've run VB DLLs from Delphi ... >> certain that LibMain is called both on normal LoadLibrary and when it ...
    (microsoft.public.vb.winapi)
  • Re: vs 2005 + mfc clr dll = gpf
    ... What is the stack backtrace? ... Error comes on the very beginning, probably when this dll is ... initializing, stack is not interesting at all. ... I remember that for vs 2003 switch ...
    (microsoft.public.vc.mfc)
  • Re: System-wide hooking, VB+ASM
    ... > Just thinking out loud, the DLL must be capable of initializing the ... Jonathan Wood ...
    (microsoft.public.vb.winapi)
  • Re: change references programmatically
    ... All the DLL does is pass a sub/function call from the main MDE to the called MDE. ... Just thinking out loud here. ...
    (comp.databases.ms-access)

Loading