Microsoft KB Archive/98324

= BUG: Excel GP Faults When Passing Intersection =

PSS ID Number: 98324

Article Last Modified on 10/20/2003

-

The information in this article applies to:


 * Microsoft Excel Software Development Kit

-



This article was previously published under Q98324



SYMPTOMS
Microsoft Excel causes a general protection (GP) fault when attempting to pass an intersection to a DLL/XLL function registered as data type &quot;R&quot;. For example, consider the following dynamic-link library (DLL) function declaration: void __export CALLBACK Test (LPXLOPER lpxl) Excel causes a GP fault if Test is called with an intersection under the following circumstances:
 * The references joined by the union operator intersect
 * The references are passed using defined names

The following call to Test will crash Excel if range1 and range2 intersect: =Test(range1 range2)



CAUSE
This is caused by a problem in Excel.



RESOLUTION
There are two possible workarounds for this problem:  If intersections may be passed to a DLL function, avoid the use of data type &quot;R&quot; (XLOPER) if possible. Use data type &quot;P&quot; (OPER) instead and the intersection will be passed as an array. Implement a &quot;wrapper&quot; macro function. For information on this method, query on the following words in the Microsoft Knowledge Base:

prod(xlsdk) and nonadjacent





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 as soon as it becomes available.

Additional query words: 4.00 3.10 gp-fault gpf buglist4.00

Keywords: KB98324

Technology: kbAudDeveloper kbExcelSearch kbExcelWinSearch kbSDKExcelSearch kbSDKSearch

-

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

© 2004 Microsoft Corporation. All rights reserved.