| Last change
 on this file since 1562 was             1502, checked in by hugh, 26 years ago | 
        
          | 
Changed to put logging info back to common logfile odin32_x.log
 | 
        
          | File size:
            1.2 KB | 
      
      
| Line |  | 
|---|
| 1 | /* $Id: OS2UTIL.CPP,v 1.6 1999-10-28 22:39:28 hugh Exp $ */ | 
|---|
| 2 |  | 
|---|
| 3 | /* | 
|---|
| 4 | * OS/2 Utility functions | 
|---|
| 5 | * | 
|---|
| 6 | * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl) | 
|---|
| 7 | * | 
|---|
| 8 | * Project Odin Software License can be found in LICENSE.TXT | 
|---|
| 9 | * | 
|---|
| 10 | */ | 
|---|
| 11 | #define INCL_DOSMEMMGR | 
|---|
| 12 | #include <os2wrap.h> | 
|---|
| 13 | #include <misc.h> | 
|---|
| 14 | #include "os2util.h" | 
|---|
| 15 |  | 
|---|
| 16 |  | 
|---|
| 17 | //****************************************************************************** | 
|---|
| 18 | //****************************************************************************** | 
|---|
| 19 | char *OS2AllocMem(ULONG size) | 
|---|
| 20 | { | 
|---|
| 21 | PVOID  lpMem; | 
|---|
| 22 | APIRET rc; | 
|---|
| 23 |  | 
|---|
| 24 | rc = DosAllocMem(&lpMem, size, PAG_READ|PAG_WRITE|PAG_COMMIT); | 
|---|
| 25 | if(rc) { | 
|---|
| 26 | dprintf(("DosAllocMem returned %d", rc)); | 
|---|
| 27 | return(NULL); | 
|---|
| 28 | } | 
|---|
| 29 | return((char *)lpMem); | 
|---|
| 30 | } | 
|---|
| 31 | //****************************************************************************** | 
|---|
| 32 | //****************************************************************************** | 
|---|
| 33 | void OS2FreeMem(char *lpMem) | 
|---|
| 34 | { | 
|---|
| 35 | APIRET rc; | 
|---|
| 36 |  | 
|---|
| 37 | rc = DosFreeMem(lpMem); | 
|---|
| 38 | if(rc) { | 
|---|
| 39 | dprintf(("DosFreeMem returned %d", rc)); | 
|---|
| 40 | } | 
|---|
| 41 | }//****************************************************************************** | 
|---|
| 42 | //****************************************************************************** | 
|---|
| 43 | void OS2MaximizeWindow(HWND hwndClient) | 
|---|
| 44 | { | 
|---|
| 45 | WinSetWindowPos(hwndClient, HWND_TOP, 0, 0, 0, 0, SWP_MAXIMIZE); | 
|---|
| 46 | } | 
|---|
| 47 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.