Microsoft KB Archive/58820

= ToolBox &quot;Type Mismatch&quot;; Use VARPTR on Array Parameter =

Article ID: 58820

Article Last Modified on 1/9/2003

-

APPLIES TO


 * Microsoft QuickBasic Compiler for Macintosh 1.0

-



This article was previously published under Q58820



SUMMARY
Many of the ToolBox statement calls documented in Section E.10.3 (Pages 497-524) of &quot;Microsoft QuickBASIC for Macintosh: Language Reference&quot; incorrectly show passing arrays by simply passing the first element of the array.

In most of these cases, this causes the error &quot;Type Mismatch&quot; on the ToolBox statement. To avoid this error, pass the VARPTR of the first element of the array.

One exception to this rule is the return array for register-based calls. This array can be passed with the first element of the array without using VARPTR.

The following routines on Pages 497-524 should pass the VARPTR of the first array element:

BackPat CopyBits EraseArc FillArc FrameArc InvertArc PaintArc RectInRgn ScrollRect SetPortBits

This information applies to Microsoft QuickBASIC Version 1.00 for the Apple Macintosh.



MORE INFORMATION
The following is a correct example of the BackPat ToolBox call: DIM pattern%(3) pattern%(0)=&HAAAA pattern%(1)=&H5555 pattern%(2)=&HAAAA pattern%(3)=&H5555 ToolBox &quot;i&quot; ToolBox &quot;P&quot;, &HA87C, VARPTR(pattern%(0))

Additional query words: MQuickB

Keywords: KB58820

-

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

© Microsoft Corporation. All rights reserved.