Oops, the linefeed in the an_read_init() declaration was inserted by my mail
program. In my modules it's all in one line.
Regards,
Sascha
-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im Auftrag von Sascha
Wildner
Gesendet: Freitag, 6. Juli 2001 15:57
An: Foxboro DCS Mail List
Betreff: AIMAPI via Visual Basic for Applications
Dear Folks,
I'm trying to access AIMAPI functions via Visual Basic for Applications with
mixed success. Everything works fine when I call functions with no
arguments. Take a module with the following declarations:
----------8<----------
Option Compare Database
Option Explicit
Public Declare Function an_print_err Lib "aimapi" () As Integer
Public Declare Function an_read_init Lib "aimapi" (ByVal initfile As String)
As Integer
---------->8----------
When I call an_print_err() it returns 0 (like it should). It seems to find
the library and the return value is also 0 if I set it to some nonzero value
first. BUT...I have not yet been able to call an_read_init() (or any other
function with arguments). When I test an_read_init() I always get a VBA run
time error 49 indicating that I used a wrong DLL calling convention (rough
translation of the error text). I suppose that there is something wrong
with my parameter declaration.
BUT WHAT???
For testing I used the following statements:
Dim reterr As Integer
reterr = an_print_err()
reterr = an_read_init("an_init.cfg")
Regards,
Sascha Wildner
erpicon Software Development GmbH
-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All
postings from this list are the work of list subscribers and no warranty
is made or implied as to the accuracy of any information disseminated
through this medium. By subscribing to this list you agree to hold the
list sponsor(s) blameless for any and all mishaps which might occur due to
your application of information received from this mailing list.
To be removed from this list, send mail to
[EMAIL PROTECTED]
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]
-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All postings from
this list are the work of list subscribers and no warranty is made or implied as to
the accuracy of any information disseminated through this medium. By subscribing to
this list you agree to hold the list sponsor(s) blameless for any and all mishaps
which might occur due to your application of information received from this mailing
list.
To be removed from this list, send mail to [EMAIL PROTECTED]
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]