Annotation of mstools/samples/nwlink/testlib/wperror.c, revision 1.1.1.1

1.1       root        1: /****************************************************************************\
                      2: *  wperror.c -- sample program library demonstrating NWLink.
                      3: *
                      4: *       Microsoft Developer Support
                      5: *       Copyright (c) 1992, 1993 Microsoft Corporation
                      6: *
                      7: *  Demonstrates basic sockets programming with the Windows Sockets API
                      8: *  using the NWLink transport.
                      9: * 
                     10: ****************************************************************************/
                     11: #include <stdio.h>
                     12: #include <windows.h>
                     13: #include <winsock.h>
                     14: #include "externs.h"
                     15: 
                     16: /****************************************************************************
                     17: *
                     18: *    FUNCTION:  win_net_perror( HWND parent, LPSTR p, int tm_flag)
                     19: *
                     20: *    PURPOSE:   Similar to the perror() function. This will display
                     21: *              a dialog box witht an error message showing the last error for 
                     22: *              the calling process.  This should be called IMMEDIATELY after 
                     23: *              a call has returned an error condition.
                     24: *
                     25: *    ARGUMENTS:        HWND    to the parent window    
                     26: *               LPSTR  => user string to print first
                     27: *               int    flag set if message box should be task modal
                     28: *
                     29: *       RETURNS:   nothing.
                     30: *
                     31: *\***************************************************************************/
                     32: void win_net_perror(HWND parent, LPSTR p, int tm_flag)
                     33: {
                     34:     MessageBox(parent, dos_net_strerror(p), NULL, 
                     35:         MB_OK | MB_ICONEXCLAMATION | (tm_flag ? MB_TASKMODAL : 0));
                     36: 
                     37:     return;
                     38: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.