BUG: Excel GP Faults When Passing Nonadjacent Reference

ID: Q98248


The information in this article applies to:
  • Microsoft Excel Software Development Kit, version 4.0


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:
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("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.

Additional query words: 4.00 GPF buglist4.00

Keywords :
Version : :4.0
Platform :
Issue type :


Last Reviewed: November 11, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.