Microsoft KB Archive/98248

= BUG: Excel GP Faults When Passing Nonadjacent Reference =

Article ID: 98248

Article Last Modified on 9/25/2003

-

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 &quot;R&quot;. 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:

A1: =Test((A2,B2))



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(&quot;ref&quot;,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.

Additional query words: 4.00 GPF buglist4.00

Keywords: KB98248

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.