Results 1 to 2 of 2

Thread: API Hell please help

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2001
    Posts
    27

    Question API Hell please help

    I don’t suppose there is an appropriate person or place to ask this simple programming question?

    I have all I need to write the module except all the examples are in C++ and I am using VB6 the documentation tells me I can use VB and I have converted the syntax to what I would expect to see i.e.

    API call: AJLError AJLSystem_Initialize(long *printerID, LPCSTR pDriverName, LPCSTR pDeviceName, LPCSTR pPortName)

    becomes

    Declare Function AJLSystem_Initialize Lib "c:\windows\system\ajlmon.dll" () As Long

    but I receive the old can't find entry point error


  2. #2
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    Chances are that the dll names are mangled...? Try refering to the call by it's position in the export table. i.e. if it is the first exported function:

    VB Code:
    1. Declare Function AJLSystem_Initialize  Lib "c:\windows\system\ajlmon.dll"  _
    2.       Alias "#1" (Byval lPrinterId As Long, _
    3.                         Byval lpDriverName As String, _
    4.                         Byval lpPortName As String) As Long

    HTH,
    Duncan
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

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