KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q35025: Accessing Switch Values in C Extensions

Article: Q35025
Product(s): See article
Version(s): 1.00   | 1.00
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | | mspl13_basic
Last Modified: 2-SEP-1988

There is no direct function call to access switch values defined in
the editor, such as rmargin or vscroll or hike, in your C Extension.
However, you can find the value by using fExecute() to switch to the
help file, then use the psearch or msearch functions to locate
rmargin. At the end of that line you will find the value associated
with rmargin.

The following is an example:

fExecute("Arg \"<assign>\" Setfile");  /* switch to "<assign>" file   */
fExecute("Mark");                      /* go to beginning of it       */
fExecute("Arg \"rmargin\" Psearch");   /* search for "rmargin"        */
fExecute("Pword");                     /* get the number after it     */

You also can use the GetLine() function to read through the <assign>
file; this method involves more coding, but it will run faster than
using fExecute() to execute macros.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.