PRB: DLL Function Returns Float or Double Value Incorrectly (86081)
The information in this article applies to:
- Microsoft Windows Software Development Kit (SDK) 3.0
- Microsoft Windows Software Development Kit (SDK) 3.1
This article was previously published under Q86081 SYMPTOMS
When a function using the C calling convention and exported from a dynamic-
link library (DLL) returns a data value of type float, double, or long
double, the calling application receives unexpected values.
CAUSE
The pointer used to return a floating-point result under the C calling
convention is invalid once control returns to the application.
RESOLUTION
Declare the DLL function using the Pascal calling convention or allocate
memory from the global heap to hold the floating-point result and return
the handle from the DLL function.
Modification Type: | Major | Last Reviewed: | 10/30/2003 |
---|
Keywords: | kb16bitonly KB86081 |
---|
|