home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / S12732.ZIP / UTILS.C < prev   
C/C++ Source or Header  |  1990-08-17  |  928b  |  45 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. #include <stdarg.h>
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17.  
  18. #define INCL_WINERRORS
  19. #define INCL_WINMESSAGEMGR
  20.  
  21. #include <os2.h>
  22.  
  23. #include "IniEdit.h"
  24.  
  25. /******************************** Globals **********************************/
  26.  
  27.  
  28. /******************************* Externals *********************************/
  29.  
  30. extern HAB habIniEdit;
  31.  
  32. void ErrMessage( char *szMsg )
  33. {
  34.  
  35.     char      szMsgBuf[132];
  36.     ERRORID   ErrorNo;
  37.  
  38.     ErrorNo = WinGetLastError( habIniEdit );
  39.  
  40.     sprintf( szMsgBuf, "%s; Error: %p", szMsg, ErrorNo );
  41.  
  42.     WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, szMsgBuf, "System Print", 0,
  43.          MB_ICONEXCLAMATION );
  44. }
  45.