Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

VB Api declaration: SymGetSymFromAddr64

  • 04-06-2004 01:43PM
    #1
    Registered Users, Registered Users 2 Posts: 1,432 ✭✭✭


    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, Registered Users 2 Posts: 1,432 ✭✭✭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