DllExecuteCallEx - Call a dll function allowing NIL parameters |
Top Previous Next |
Syntax
<nResult> := DllExecuteCallEx( <cCallTemplate> [, <xParams1..n>] )
Parameters
<cCallTemplate>
<cCallTemplate> is a binary character string which was returned by the function DllPrepareCall().
<xParams1..n>
<xParams1..n> is the list of parameters to be passed as arguments to the dll function. The types of the arguments must match the ones required by the called function. Please see DllExecuteCall() and DllCall() in the Xbase++ documentation for details.
Return value
DllExecuteCalEx returns the return value of the executed dll function. If the dll supports the Xbase++ calling convention, the value can be of any Xbase++ data type. Otherwise, the return value is numeric.
Description
DllExecuteCallEx is a replacement for the DllExecuteCall() function of Xbase++. It fixes problems with NIL parameters present in Xbase++ versions before 1.90 and it takes down the last O/S error code after the call. This error code can be retrieved with GetLastError() and set with SetLastError(). stores the last DllExecuteCall() has a problem in Version 1.82 when NIL parameters are passed to it while DLL_CALLMODE_COPY is selected. In this case the GC of your application is stopped for the time the call is active. DllExecuteCallEx resolves this problem. With this behaviour the optional parameters in adapter functions, that are automatically defaulted to NIL, can be directly passed on to the wrapped dll functions.
#Including "DllCallFix.ch" in your source files will change every call to DllExectuteCall() to DllExecuteCallEx.
Classification
Core
Category
Quick Info
Library: cckptcor.lib /cckptcor.dll Header: DllCallFix.ch
Example
|