BUG: Excel GP Faults When Passing Nonadjacent Reference (98248)
The information in this article applies to:
- Microsoft Excel Software Development Kit 4.0
This article was previously published under Q98248 SYMPTOMS
Microsoft Excel causes a general protection (GP) fault when attempting to
pass a nonadjacent reference to a DLL/XLL function registered as data type
"R". For example, consider the following DLL function declaration:
void __export CALLBACK Test (LPXLOPER lpxl)
Excel causes a GP fault if Test is called with a nonadjacent reference:
RESOLUTION
The workaround for this problem is to call the dynamic-link library (DLL)
function via a macro wrapper function. The layer of indirection introduced
by calling the DLL function through a macro intermediary allows
nonadjacent references to be passed without error. Here is a wrapper macro
for the Test function:
TestWrapper A macro wrapper function for Test
=ARGUMENT("ref",8) Test only allows xltypeRef | xltypeSRef
=RESULT(127) Don't restrict return type
=RETURN(Test(ref)) Call Test
STATUS
Microsoft has confirmed this to be a problem in Excel version 4.0. We are
researching this problem and will post new information here in the
Microsoft Knowledge Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 9/25/2003 |
---|
Keywords: | KB98248 |
---|
|