How do you convert this function (C++) to vb6

Discussion in 'General Software Discussion' started by kimi40, Mar 8, 2006.

  1. kimi40

    kimi40 New Member

    Joined:
    Jun 29, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    0
    Hi guys, i`m stuck here. I`m using a DLL developed from VC++ to be use with VB6. This is a function that i`m stuck. It crashed when i call the function

    VC++ (Protocol.dll)
    Protocol_API READERERROR WINAPI SelApp(WORD Size, LPBYTE AID, LPBYTE Response,uint16 slot);


    VB6
    Declare Function SelApp Lib "Protocol.dll" Alias "_SelApp@16" (ByVal Size As Integer, ByVal AID As String, ByVal Response As String, uint16 As Long) As Long

    Please help me

    Thanks.
     
  2. UberLord

    UberLord A Legend in Underwear

    Joined:
    May 8, 2002
    Messages:
    5,255
    Likes Received:
    4
    Trophy Points:
    0
    Try this

    Declare Function SelApp Lib "Protocol.dll" Alias "_SelApp@16" (ByRef Size As Long, ByRef AID As Any, ByRef Response As Any, ByRef uint16 As Long) As Long
     
  3. kimi40

    kimi40 New Member

    Joined:
    Jun 29, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    0
    Ok Thanks.

    But it turns out that I`m missing the one of the 'ByVal' thing. HEHEHE

    Thank You for your reply.
     

Share This Page

visited