ACC: How to Declare C++ Functions Called from Access BasicID: Q109338
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
The following steps describe how to call C++ dynamic-link library (DLL)
functions in Access Basic:
extern "C" {return type} FAR PASCAL __export {function name} ({parameters})An example of an actual declaration in your C++ code might look like:
extern "C" int FAR PASCAL __export my_func ()To call the sample function above you would define the Declare statement as follows:
Declare Function my_func Lib "MYLIB.DLL" () As Integer
For more information about calling DLLs, search on "declare external procedures" using the Microsoft Access Help menu.
Additional query words: programming
Keywords : kbprg
Version : 1.0 1.1 2.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 29, 1999