|
-
Feb 20th, 2002, 07:46 AM
#1
Thread Starter
Junior Member
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
-
Feb 20th, 2002, 08:51 AM
#2
Frenzied Member
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:
Declare Function AJLSystem_Initialize Lib "c:\windows\system\ajlmon.dll" _
Alias "#1" (Byval lPrinterId As Long, _
Byval lpDriverName As String, _
Byval lpPortName As String) As Long
HTH,
Duncan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|