00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <os2win.h>
00013 #include <misc.h>
00014 #include <wprocess.h>
00015 #include "oslibutil.h"
00016
00017 #define DBG_LOCALLOG DBG_oslibutil
00018 #include "dbglocal.h"
00019
00020
00021
00022 HAB GetThreadHAB()
00023 {
00024 TEB *teb;
00025
00026 teb = GetThreadTEB();
00027 if(teb)
00028 {
00029 return (HAB)teb->o.odin.hab;
00030 }
00031
00032 dprintf(("GetThreadHAB: teb == NULL!!"));
00033 return 0;
00034 }
00035
00036
00037 void SetThreadHAB(HAB hab)
00038 {
00039 TEB *teb;
00040
00041 teb = GetThreadTEB();
00042 if(teb)
00043 {
00044 teb->o.odin.hab = (ULONG)hab;
00045 }
00046 else dprintf(("SetThreadHAB: teb == NULL!!"));
00047 }
00048
00049
00050 HMQ GetThreadMessageQueue()
00051 {
00052 TEB *teb;
00053
00054 teb = GetThreadTEB();
00055 if(teb)
00056 {
00057 return (HMQ)teb->o.odin.hmq;
00058 }
00059
00060 dprintf(("GetThreadMessageQueue: teb == NULL!!"));
00061 return 0;
00062 }
00063
00064
00065 void SetThreadMessageQueue(HMQ hmq)
00066 {
00067 TEB *teb;
00068
00069 teb = GetThreadTEB();
00070 if(teb)
00071 {
00072 teb->o.odin.hmq = (ULONG)hmq;
00073 }
00074 else dprintf(("SetThreadMessageQueue: teb == NULL!!"));
00075 }
00076
00077