| Line | |
|---|
| 1 | /* $Id: oslibutil.cpp,v 1.1 1999-07-17 09:17:57 sandervl Exp $ */
|
|---|
| 2 | /*
|
|---|
| 3 | * Window API utility functions for OS/2
|
|---|
| 4 | *
|
|---|
| 5 | *
|
|---|
| 6 | * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
|
|---|
| 7 | *
|
|---|
| 8 | *
|
|---|
| 9 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 10 | *
|
|---|
| 11 | */
|
|---|
| 12 | #include <os2win.h>
|
|---|
| 13 | #include <misc.h>
|
|---|
| 14 | #include <wprocess.h>
|
|---|
| 15 | #include "oslibutil.h"
|
|---|
| 16 |
|
|---|
| 17 | //******************************************************************************
|
|---|
| 18 | //******************************************************************************
|
|---|
| 19 | HAB GetThreadHAB()
|
|---|
| 20 | {
|
|---|
| 21 | THDB *thdb;
|
|---|
| 22 |
|
|---|
| 23 | thdb = GetThreadTHDB();
|
|---|
| 24 | if(thdb)
|
|---|
| 25 | {
|
|---|
| 26 | return (HAB)thdb->hab;
|
|---|
| 27 | }
|
|---|
| 28 |
|
|---|
| 29 | dprintf(("GetThreadHAB: thdb == NULL!!"));
|
|---|
| 30 | return 0;
|
|---|
| 31 | }
|
|---|
| 32 | //******************************************************************************
|
|---|
| 33 | //******************************************************************************
|
|---|
| 34 | void SetThreadHAB(HAB hab)
|
|---|
| 35 | {
|
|---|
| 36 | THDB *thdb;
|
|---|
| 37 |
|
|---|
| 38 | thdb = GetThreadTHDB();
|
|---|
| 39 | if(thdb)
|
|---|
| 40 | {
|
|---|
| 41 | thdb->hab = (ULONG)hab;
|
|---|
| 42 | }
|
|---|
| 43 | else dprintf(("SetThreadHAB: thdb == NULL!!"));
|
|---|
| 44 | }
|
|---|
| 45 | //******************************************************************************
|
|---|
| 46 | //******************************************************************************
|
|---|
| 47 | HMQ GetThreadMessageQueue()
|
|---|
| 48 | {
|
|---|
| 49 | THDB *thdb;
|
|---|
| 50 |
|
|---|
| 51 | thdb = GetThreadTHDB();
|
|---|
| 52 | if(thdb)
|
|---|
| 53 | {
|
|---|
| 54 | return (HMQ)thdb->hmq;
|
|---|
| 55 | }
|
|---|
| 56 |
|
|---|
| 57 | dprintf(("GetThreadMessageQueue: thdb == NULL!!"));
|
|---|
| 58 | return 0;
|
|---|
| 59 | }
|
|---|
| 60 | //******************************************************************************
|
|---|
| 61 | //******************************************************************************
|
|---|
| 62 | void SetThreadMessageQueue(HMQ hmq)
|
|---|
| 63 | {
|
|---|
| 64 | THDB *thdb;
|
|---|
| 65 |
|
|---|
| 66 | thdb = GetThreadTHDB();
|
|---|
| 67 | if(thdb)
|
|---|
| 68 | {
|
|---|
| 69 | thdb->hmq = (ULONG)hmq;
|
|---|
| 70 | }
|
|---|
| 71 | else dprintf(("SetThreadMessageQueue: thdb == NULL!!"));
|
|---|
| 72 | }
|
|---|
| 73 | //******************************************************************************
|
|---|
| 74 | //******************************************************************************
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.