Npclnt.exe WFW Named Pipe Client
This article was previously published under Q113190 SUMMARY The sample Npclnt.exe in the Microsoft Download Center
demonstrates the named pipe client interface in Windows for Workgroups (WFW).
This sample provides a WFW named pipe client for the Win32 SDK named pipe sample (NPSERVER). This sample opens, reads, and writes to the named pipe created by the NPSERVER application. The DosReadAsyncNmPipe API is used to perform asynchronous reads from the server's named pipe to avoid blocking under WFW. NOTE: This sample has two problems.
MORE INFORMATIONThe
following file is available for download from the Microsoft Download
Center: Download Npclnt.exe now (http://download.microsoft.com/download/platformsdk/npclnt/3.1/w31/en-us/npclnt.exe)119591 (http://support.microsoft.com/kb/119591/EN-US/) How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most
current virus-detection software that was available on the date that the file
was posted. The file is stored on security-enhanced servers that help to
prevent any unauthorized changes to the file.
Care must be taken when using DosReadAsyncNmPipe or
DosWriteAsyncNmPipe. Because both APIs provide WFW a function pointer that is
called at interrupt time, only limited operations may be performed in the
callback. The WFW SDK reference states the following about the callback
function:
Generally, the callback function can set global variables and check the
variable specified by the pusErrCode parameter for potential errors. But
the callback function must not modify registers or call any MS-DOS
system functions, BIOS functions, or C run-time functions that call MS-
DOS and BIOS functions. Although the callback function can call the
PostMessage function, it must not call the SendMessage function.
Also, the callback function must be exported in the application's
*.DEF file. Besides exporting, the application must call MakeProcInstance on
the function before calling the asynchronous API. Care must also be taken not
to call FreeProcInstance while a read or write is outstanding.
| Article Translations
|

Back to the top
