Excel4v() Function Prototype May Require Modifications

ID: Q95889


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


SUMMARY

To use the Excel4v() function in small or medium memory model dynamic-link libraries (DLL), it may be necessary to modify the Excel4v() prototype in XLCALL.H. The need for this modification depends on the compiler used.

The Excel4v() function is prototyped in XLCALL.H as follows:


  int far pascal Excel4v(int      xlfn,
                         LPXLOPER operRes,
                         int      count,
                         LPXLOPER far opers[]); 
Borland C++ version 3.1 and Microsoft C++ version 7.0 do not allow far pointers to arrays. If this Excel4v() prototype is used with these compilers, the far keyword is ignored. To correct this problem, modify the last formal argument to resemble the following:

   LPXLOPER far *opers 
This modification is not necessary for large or compact memory model DLLs, because pointers are far by default in these memory models.


MORE INFORMATION

The following are the error messages produced when the unmodified prototype for the Excel4v function is used:

In Microsoft C++ 7.0:

Warning C4040: memory attribute on 'opers' ignored
In Borland C++ 3.1:
Suspicious pointer conversion
Borland C++ 3.1 is manufactured by a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.

Additional query words: 4.00 general protection fault GPF GP-fault

Keywords :
Version : :4.0
Platform :
Issue type :


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