1.
Error: Error opening DLL library for external function at line
in the event of object of .
Possible causes:
> DLL is 16 bit and thus incompatible.
> DLL is not in a searchable directory.
> DLL connects to another DLL that cannot be found.
> DLL has the same name as another already loaded into memory.
> DLL is corrupted or in an incompatible format.
2. Error: Error calling external function at line
in the event of object
of
This is probably the result of an
incorrectly spelt function name. Be sure to verify that the function name
matches what is in the DLL exactly,
including the case of the letters.
3. Error: Specified argument type differs from required argument type at
runtime in DLL function . (Invalid stack pointer on return from function call) at line in
event of object of.
This error usually indicates the datatypes do not match what the DLL
function is expecting.
4. Receiving garbage from the DLL. i.e. Last name populated as:
"*#^&Ashish"
This problem is most likely the result of the byte alignment being set
incorrectly. PowerBuilder expects the byte alignment to be set to one
and if you are using MSVC++ compiler the default setting is four. To set
the byte alignment to one you would need to do the following prior
to compiling to a dll.
- Select the desired target
- Right mouse click and select Settings
- Select the C/C++ tabpage
- Select Code Generation from the Category dropdown list
- Select desired byte alignment from the Struct Member Alignment
dropdown list.
The DOS switch to set the byte alignment to one is: /zp1
No comments:
Post a Comment