CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: GetProcAddress

  1. #1
    Join Date
    Apr 2001
    Location
    California
    Posts
    4

    GetProcAddress

    Hi Everyone,

    I'm having problems with getting the address of my only function in my DLL using GetProcAddress.
    I have created a test DLL in VB 6.0 (Test.Dll). This DLL has one Multiuse Class. The class has only one public function "MyProc".
    I use LoadLibrary to load the DLL, and use GetProcAddress to get the address for the function "MyProc". For some reasons, GetProcAddress passes ZERO for the address of "MyProc" function. Can anyone help please. Thanks.

    Here is the code:
    lHandle = LoadLibrary ("Test.Dll" & vbNullChar)
    lProcAddress = GetProcAddress ( lHandle, "MyProc" & vbNullChar)

    I get ZERO for lProcAddress!!!!


  2. #2
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: GetProcAddress

    It is my understanding that Visual Basic can only be used to create ActiveX dlls.
    These DLLs do not have the #EXPORTS list for procedures so therefore GetProcAddress cannot deal with them.
    There are 3rd party tools that are supposed to get around this, however.

    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

  3. #3
    Join Date
    Apr 2001
    Location
    California
    Posts
    4

    Re: GetProcAddress

    Thanks very much for the info.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured