Line | |
---|
1 | /*
|
---|
2 | * OS/2 Utility functions
|
---|
3 | *
|
---|
4 | * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
5 | *
|
---|
6 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
7 | *
|
---|
8 | */
|
---|
9 | #define INCL_DOSMEMMGR
|
---|
10 | #include <os2.h>
|
---|
11 | #include "misc.h"
|
---|
12 | #include "os2util.h"
|
---|
13 |
|
---|
14 |
|
---|
15 | //******************************************************************************
|
---|
16 | //******************************************************************************
|
---|
17 | char *OS2AllocMem(ULONG size)
|
---|
18 | {
|
---|
19 | PVOID lpMem;
|
---|
20 | APIRET rc;
|
---|
21 |
|
---|
22 | rc = DosAllocMem(&lpMem, size, PAG_READ|PAG_WRITE|PAG_COMMIT);
|
---|
23 | if(rc) {
|
---|
24 | dprintf(("DosAllocMem returned %d", rc));
|
---|
25 | return(NULL);
|
---|
26 | }
|
---|
27 | return((char *)lpMem);
|
---|
28 | }
|
---|
29 | //******************************************************************************
|
---|
30 | //******************************************************************************
|
---|
31 | void OS2FreeMem(char *lpMem)
|
---|
32 | {
|
---|
33 | APIRET rc;
|
---|
34 |
|
---|
35 | rc = DosFreeMem(lpMem);
|
---|
36 | if(rc) {
|
---|
37 | dprintf(("DosFreeMem returned %d", rc));
|
---|
38 | }
|
---|
39 | }//******************************************************************************
|
---|
40 | //******************************************************************************
|
---|
41 | void OS2MaximizeWindow(HWND hwndClient)
|
---|
42 | {
|
---|
43 | WinSetWindowPos(hwndClient, HWND_TOP, 0, 0, 0, 0, SWP_MAXIMIZE);
|
---|
44 | }
|
---|
45 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.