Example of Passing Strings from C to Basic (48207)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
This article was previously published under Q48207 SUMMARY
The two programs below demonstrate how Microsoft C can create and pass
both fixed-length and variable-length strings to Microsoft Basic.
This information about interlanguage calling applies to QuickBasic
versions 4.00, 4.00b, 4.50 for MS-DOS, to Microsoft Basic Compiler
versions 6.00 and 6.00b for MS-DOS and MS OS/2, and to Microsoft Basic
Professional Development System (PDS) versions 7.00 and 7.10 for
MS-DOS and MS OS/2.
For Basic PDS 7.00 and 7.10, this example works only with near
strings. If you are using far strings (BC /Fs compile switch or in
QBX.EXE), you must use the string-manipulation routines provided with
Basic PDS 7.00 and 7.10 to change variable-length strings
(StringAssign, StringRelease, StringAddress, and StringLength). For
more information about using far strings, see Chapter 13 of the
"Microsoft Basic 7.0: Programmer's Guide" for versions 7.00 and 7.10.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB48207 |
---|
|