Microsoft KB Archive/58426

= Microsoft Knowledge Base =

BC 6.00/7.00 Example Single Process Using OS/2 Queue API CALLs
Last reviewed: September 25, 1997

Article ID: Q58426

6.00 6.00b 7.00 OS/2 kbprg kbfile

SUMMARY
A file is available in the Microsoft Software Library that provides an example of using MS OS/2 queues from Basic. In this example, a single Basic process (running in one OS/2 screen group) creates a queue, writes information to the queue, and reads information back from the queue. This example uses the following MS OS/2 API calls:

DosCreateQueue DosReadQueue DosWriteQueue DosQueryQueue DosCloseQueue DosPeekQueue DosPurgeQueue DosAllocShrSeg DosGetShrSeg This information applies to Microsoft Basic Compiler versions 6.00 and 6.00b for MS OS/2, and to Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS OS/2. (This information does not apply to Microsoft QuickBasic, which supports only the MS-DOS operating system.)

To obtain the code from the Microsoft Knowledge Base, please see the following article:

ARTICLE-ID:Q40869

TITLE    :BC 6.00 Example of Single Process Using OS/2 Queue API CALLs To obtain the code from the Microsoft Software Library:

You can find BCOS2API.EXE, a self-extracting file, on these services:

  Microsoft's World Wide Web site on the Internet On the www.microsoft.com home page, click the Support icon Click Knowledge Base, and select the product Enter kbfile BCOS2API.EXE, and click GO! Open the article, and click the button to download the file   Internet (anonymous FTP) ftp ftp.microsoft.com Change to the Softlib/Mslfiles folder Get BCOS2API.EXE   The Microsoft Network On the Edit menu, click Go To, and then click Other Location Type &quot;mssupport&quot; (without the quotation marks) Double-click the MS Software Library icon Find the appropriate product area Locate and Download BCOS2API.EXE   Microsoft Download Service (MSDL) Dial (425) 936-6735 to connect to MSDL Download BCOS2API.EXE 

For additional information about downloading, please see the following article in the Microsoft Knowledge Base:

ARTICLE-ID: Q119591 TITLE    : How to Obtain Microsoft Support Files from Online Services

MORE INFORMATION
The following files make up this example:

 Q3.BAS - A program that creates/reads a Queue QUEUE.BI - An include file used by Q3.BAS UTIL.BAS - Basic routines to read/write shared memory</li>  README.A - Text file describing how to compile, link, and run this example (as shown below) </li></ol>

The compile and LINK instructions are as follows:


 * 1) BC q3;
 * 2) BC util /x;
 * 3) LINK q3 util;

Once you have compiled and linked as shown above, you can run Q3.EXE.