I am returning to PBDLL after a few month's absence. In the past I have called PBDLLs from VBA, but currently am getting a "File Not Found". I remember that some sort of care had to be taken with filename capitalization, which does not seem to match the code from the .bas. I'm running NT4. What precautions do I need to take in case-mathcning the calls and dll names? Thanks-
Announcement
Collapse
No announcement yet.
Filename capitalization
Collapse
X
-
The problem is most likely to be function and/or sub name capitalization (not the filename), but VB/VBA tend to misreport the error.
The solution is to use the ALIAS clause in your exported PB sub/function name prototypes. Unless you specify an ALIAS, PowerBASIC will capitalize the export sub/function names. VB uses the capitalization you provide in the declaration, but you can override that with an ALIAS clause too.
For example:
Code:FUNCTION FunctionA () EXPORT AS LONG ' Export name is "FUNCTIONA" FUNCTION FunctionB ALIAS "FunctionB" EXPORT AS LONG ' Export name is "FunctionB"
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>Lance
mailto:[email protected]
Comment