Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB Api declaration: SymGetSymFromAddr64

Options
  • 04-06-2004 1:43pm
    #1
    Registered Users Posts: 1,421 ✭✭✭


    I am having problems with the declaration of this API call.

    I have :-
    Private Type ULONG_64
        byte0 As Byte
        byte1 As Byte
        byte2 As Byte
        byte3 As Byte
        byte4 As Byte
        byte5 As Byte
        byte6 As Byte
        byte7 As Byte
    End Type
    
    Private Type IMAGEHELP_SYMBOL64
      SizeOfStruct As Long
      Address As ULONG_64
      size As Long
      Flags As Long
      MaxNameLength As Long
      Name As String
    End Type
    
    'BOOLEAN SymGetSymFromAddr64(
    '     IN  HANDLE              hProcess,
    '     IN  DWORD64             qwAddr,
    '     OUT PDWORD64            pdwDisplacement,
    ' '    OUT PIMAGEHLP_SYMBOL64  Symbol
    Public Declare Function SymGetSymFromAddr64 Lib "dbghelp.dll" ( _
                   ByVal hProcess As Long, _
                   qwAddr As ULONG_64, _
                   pdwDisplacement As ULONG_64, _
                    Symbol As IMAGEHELP_SYMBOL64) As Long
    

    but when I call it I get an error Bad DLL Calling Convention which means my declaration is putting too little or too much on ths stack.

    Any ideas?


Comments

  • Registered Users Posts: 1,421 ✭✭✭Merrion


    Changing to
    Byval qwAddr As Currency
    
    seems to have improved things - I'm now getting a The specified module could not be found error but that's presumably because it can't find the debug info for my system dlls.


Advertisement