home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / iniedit1.zip / UTILS.C < prev   
C/C++ Source or Header  |  1989-02-24  |  947b  |  46 lines

  1. /******************************* Module Header ******************************\
  2. * Module Name: Utils.c
  3. *
  4. *
  5. *
  6. *
  7. * PM OS2.ini Editor
  8. *
  9. * Miscellaneous Utility Functions
  10. *
  11. *
  12. \***************************************************************************/
  13.  
  14. #define LINT_ARGS
  15. #include <stdarg.h>
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18.  
  19. #define INCL_WINERRORS
  20. #define INCL_WINMESSAGEMGR
  21.  
  22. #include <os2.h>
  23.  
  24. #include "IniEdit.h"
  25.  
  26. /******************************** Globals **********************************/
  27.  
  28.  
  29. /******************************* Externals *********************************/
  30.  
  31. extern HAB habIniEdit;
  32.  
  33. void ErrMessage( char *szMsg )
  34. {
  35.  
  36.     char      szMsgBuf[132];
  37.     ERRORID   ErrorNo;
  38.  
  39.     ErrorNo = WinGetLastError( habIniEdit );
  40.  
  41.     sprintf( szMsgBuf, "%s; Error: %p", szMsg, ErrorNo );
  42.  
  43.     WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, szMsgBuf, "System Print", 0,
  44.          MB_ICONEXCLAMATION );
  45. }
  46.