Microsoft KB Archive/50229

= Basic Can't Use Microsoft Windows SDK to Make Applications =

Article ID: 50229

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Compiler 6.0
 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q50229



SUMMARY
You cannot create Microsoft Windows programs using Microsoft Basic. The Microsoft Windows Software Development Kit (SDK) for MS-DOS is compatible with Microsoft C and Microsoft Macro Assembler (MASM), but it is not compatible with Microsoft QuickBasic versions 4.00, 4.00b, or 4.50 (or earlier versions) for MS-DOS, Microsoft Basic Compiler versions 6.00 and 6.00b (or earlier) for MS-DOS, or Microsoft Basic Professional Development System (PDS) version 7.00 or 7.10 for MS-DOS.

The programs created by the above Basic versions can run in Microsoft Windows only by taking complete control of the screen and computer. When the Basic program terminates, control is released back to Windows.



MORE INFORMATION
In programs written for Microsoft Windows, the usual start-up code for a language is not called. Instead, special start-up code for Microsoft Windows is called. This start-up code in turn calls the function &quot;WinMain&quot; in the program. There is no main-line code in a Microsoft Windows program, such as the &quot;main module level code&quot; in Basic or the main function in C. Instead the Windows start-up code takes the place of the main-line code and in turn directly calls WinMain.

The Microsoft Windows start-up code is compatible with the C start-up code, but compiled Basic must be the initial program and must be run through its own start-up code to initialize its memory management routines. Because there is no way to run the Windows start-up code and then call the Basic start-up code, you can't create Microsoft Windows programs using Microsoft Basic.

Note that Microsoft Pascal 4.00 can use the Microsoft Windows Software Development Kit (SDK) for MS-DOS to develop programs for Microsoft Windows versions 2.x, but CANNOT develop programs for Microsoft Windows version 3.00. Microsoft recommends using C or assembler instead of Pascal for Windows programming for MS-DOS.

Although you can't program under Microsoft Windows for MS-DOS using Microsoft Basic, you can program MS OS/2 Presentation Manager (PM) applications using Microsoft Basic Compiler versions 6.00 and 6.00b and Microsoft Basic PDS versions 7.00 and 7.10. This is detailed in a separate article, which can be found by querying in this Knowledge Base using the following words:

OS/2 and presentation and manager and Basic and 6.00b

Additional query words: QuickBas BasicCom

Keywords: KB50229

-

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

© Microsoft Corporation. All rights reserved.