source: trunk/src/kernel32/kobjects.cpp@ 5332

Last change on this file since 5332 was 5332, checked in by sandervl, 24 years ago

pe loader fix (graceful failure when unable to find dll) + several small changes

File size: 25.6 KB
Line 
1/* $Id: kobjects.cpp,v 1.12 2001-03-19 19:27:13 sandervl Exp $ */
2
3/*
4 * Project Odin Software License can be found in LICENSE.TXT
5 * Win32 compatibility file functions for OS/2
6 * Copyright 1998 Sander van Leeuven
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1998 Knut St. Osmundsen
10 */
11
12
13/*****************************************************************************
14 * Includes *
15 *****************************************************************************/
16
17#include <odin.h>
18#include <odinwrap.h>
19#include <os2sel.h>
20
21#include <os2win.h>
22#include "misc.h"
23#include "handlemanager.h"
24
25#define DBG_LOCALLOG DBG_kobjects
26#include "dbglocal.h"
27
28
29ODINDEBUGCHANNEL(KERNEL32-KOBJECTS)
30
31
32// REMARK: THIS IS IN PREPARATION FOR HANDLEMANAGER SUPPORT (PH) !!
33//#define HMCreateEvent O32_CreateEvent
34//#define HMCreateMutex O32_CreateMutex
35//#define HMCreateSemaphore O32_CreateSemaphore
36//#define HMSetEvent O32_SetEvent
37//#define HMReleaseMutex O32_ReleaseMutex
38//#define HMWaitForSingleObject O32_WaitForSingleObject
39//#define HMWaitForSingleObjectEx O32_WaitForSingleObjectEx
40//#define HMGetOverlappedResult O32_GetOverlappedResult
41//#define HMOpenEvent O32_OpenEvent
42//#define HMOpenMutex O32_OpenMutex
43//#define HMOpenSemaphore O32_OpenSemaphore
44//#define HMPulseEvent O32_PulseEvent
45//#define HMReleaseSemaphore O32_ReleaseSemaphore
46//#define HMResetEvent O32_ResetEvent
47//#define HMWaitForMultipleObjects O32_WaitForMultipleObjects
48//#define HMWaitForMultipleObjectsEx O32_WaitForMultipleObjectsEx
49//#define HMFlushFileBuffers O32_FlushFileBuffers
50#define HMSetHandleCount O32_SetHandleCount
51#define HMGetHandleCount O32_GetHandleCount
52//#define HMDuplicateHandle O32_DuplicateHandle
53
54
55
56/*****************************************************************************
57 * Defines *
58 *****************************************************************************/
59
60 /* this define enables certain less important debug messages */
61//#define DEBUG_LOCAL 1
62
63
64
65/*****************************************************************************
66 * Name : BOOL CreateEventA
67 * Purpose : forward call to Open32
68 * Parameters:
69 * Variables :
70 * Result :
71 * Remark :
72 * Status :
73 *
74 * Author : Patrick Haller [Fri, 1998/06/12 03:44]
75 *****************************************************************************/
76
77ODINFUNCTION4(HANDLE, CreateEventA,
78 LPSECURITY_ATTRIBUTES, lpsa,
79 BOOL, fManualReset,
80 BOOL, fInitialState,
81 LPCTSTR, lpszEventName)
82{
83 return(HMCreateEvent(lpsa, /* create event semaphore */
84 fManualReset,
85 fInitialState,
86 lpszEventName));
87}
88
89
90/*****************************************************************************
91 * Name : BOOL CreateEventW
92 * Purpose : forward call to Open32
93 * Parameters:
94 * Variables :
95 * Result :
96 * Remark : handle translation is done in CreateEventA
97 * Status :
98 *
99 * Author : Patrick Haller [Fri, 1998/06/12 03:44]
100 *****************************************************************************/
101
102ODINFUNCTION4(HANDLE, CreateEventW,
103 LPSECURITY_ATTRIBUTES, arg1,
104 BOOL, arg2,
105 BOOL, arg3,
106 LPCWSTR, arg4)
107{
108 HANDLE rc;
109 char *astring;
110
111 if (arg4 != NULL) // support for unnamed semaphores
112 astring = UnicodeToAsciiString((LPWSTR)arg4);
113 else
114 astring = NULL;
115
116 dprintf(("KERNEL32: CreateEventW(%s)\n",
117 astring));
118
119 rc = HMCreateEvent(arg1,
120 arg2,
121 arg3,
122 astring);
123
124 if (astring != NULL)
125 FreeAsciiString(astring);
126
127 return(rc);
128}
129
130
131/*****************************************************************************
132 * Name : BOOL CreateMutexA
133 * Purpose : forward call to Open32
134 * Parameters:
135 * Variables :
136 * Result :
137 * Remark : handle translation is done in CreateMutexA
138 * Status :
139 *
140 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
141 *****************************************************************************/
142
143ODINFUNCTION3(HANDLE, CreateMutexA,
144 LPSECURITY_ATTRIBUTES, lpsa,
145 BOOL, fInitialOwner,
146 LPCTSTR, lpszMutexName)
147{
148 dprintf(("KERNEL32: CreateMutexA(%s)\n",
149 lpszMutexName));
150
151 return(HMCreateMutex(lpsa,
152 fInitialOwner,
153 lpszMutexName));
154}
155
156
157/*****************************************************************************
158 * Name : BOOL CreateMutexW
159 * Purpose : forward call to Open32
160 * Parameters:
161 * Variables :
162 * Result :
163 * Remark : handle translation is done in CreateMutexW
164 * Status :
165 *
166 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
167 *****************************************************************************/
168
169ODINFUNCTION3(HANDLE, CreateMutexW,
170 PSECURITY_ATTRIBUTES, arg1,
171 BOOL, arg2,
172 LPCWSTR, arg3)
173{
174 HANDLE rc;
175 char *astring;
176
177 if (arg3 != NULL) // support for unnamed mutexes
178 astring = UnicodeToAsciiString((LPWSTR)arg3);
179 else
180 astring = NULL;
181
182 dprintf(("KERNEL32: CreateMutexW(%s)\n",
183 astring));
184
185 rc = HMCreateMutex(arg1,
186 arg2,
187 astring);
188
189 if (astring != NULL)
190 FreeAsciiString(astring);
191
192 return(rc);
193}
194
195
196/*****************************************************************************
197 * Name : BOOL ReleaseMutex
198 * Purpose : forward call to Open32
199 * Parameters:
200 * Variables :
201 * Result :
202 * Remark : handle translation is done in ReleaseMutex
203 * Status :
204 *
205 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
206 *****************************************************************************/
207
208ODINFUNCTION1(BOOL, ReleaseMutex,
209 HANDLE, mutex)
210{
211 return(HMReleaseMutex(mutex));
212}
213
214
215/*****************************************************************************
216 * Name : BOOL SetEvent
217 * Purpose : forward call to Open32
218 * Parameters:
219 * Variables :
220 * Result :
221 * Remark : handle translation is done in SetEvent
222 * Status :
223 *
224 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
225 *****************************************************************************/
226
227ODINFUNCTION1(BOOL, SetEvent,
228 HANDLE, hEvent)
229{
230 return(HMSetEvent(hEvent));
231}
232
233
234/*****************************************************************************
235 * Name : BOOL WaitForSingleObject
236 * Purpose : forward call to Open32
237 * Parameters:
238 * Variables :
239 * Result :
240 * Remark : handle translation is done in WaitForSingleObject
241 * Status :
242 *
243 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
244 *****************************************************************************/
245
246ODINFUNCTION2(DWORD, WaitForSingleObject,
247 HANDLE, hObject,
248 DWORD, timeout)
249{
250 return(HMWaitForSingleObject(hObject,
251 timeout));
252}
253
254
255/*****************************************************************************
256 * Name : DWORD WaitForSingleObjectEx
257 * Purpose : The WaitForSingleObjectEx function is an extended wait function
258 * that can be used to perform an alertable wait. This enables the
259 * function to return when the system queues an I/O completion
260 * routine to be executed by the calling thread. The function also
261 * returns when the specified object is in the signaled state or
262 * when the time-out interval elapses.
263 * Parameters: HANDLE hObject handle of object to wait for
264 * DWORD dwTimeout time-out interval in milliseconds
265 * BOOL fAlertable alertable wait flag
266 * Variables :
267 * Result : 0xFFFFFFFF in case of error
268 * Remark : only really required for async I/O
269 * Status : UNTESTED STUB
270 *
271 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
272 *****************************************************************************/
273
274ODINFUNCTION3(DWORD, WaitForSingleObjectEx,
275 HANDLE, hObject,
276 DWORD, dwTimeout,
277 BOOL, fAlertable)
278{
279 dprintf(("Kernel32: WaitForSingleObjectEx(%08xh,%08xh,%08xh) not implemented correctly.\n",
280 hObject,
281 dwTimeout,
282 fAlertable));
283
284 return(HMWaitForSingleObjectEx(hObject,
285 dwTimeout,
286 fAlertable));
287}
288
289
290/*****************************************************************************
291 * Name : BOOL FlushFileBuffers
292 * Purpose : forward call to Open32
293 * Parameters:
294 * Variables :
295 * Result :
296 * Remark : handle translation is done in FlushFileBuffers
297 * Status :
298 *
299 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
300 *****************************************************************************/
301
302ODINFUNCTION1(BOOL, FlushFileBuffers,
303 HANDLE, hFile)
304{
305 return(HMFlushFileBuffers(hFile));
306}
307
308
309/*****************************************************************************
310 * Name : UINT SetHandleCount
311 * Purpose : forward call to Open32
312 * Parameters:
313 * Variables :
314 * Result :
315 * Remark : handle translation is done in SetHandleCount
316 * Status :
317 *
318 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
319 *****************************************************************************/
320
321ODINFUNCTION1(UINT, SetHandleCount,
322 UINT, cHandles)
323{
324 //SvL: Has no effect in NT; also ignore it
325 return cHandles;
326}
327
328
329/*****************************************************************************
330 * Name : BOOL DuplicateHandle
331 * Purpose : forward call to Open32
332 * Parameters:
333 * Variables :
334 * Result :
335 * Remark : handle translation is done in DuplicateHandle
336 * Status :
337 *
338 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
339 *****************************************************************************/
340
341//******************************************************************************
342//SvL: 24-6-'97 - Added
343//SvL: 28-6-'97: Fix for timeSetEvent in Red Alert Map Editor
344//******************************************************************************
345ODINFUNCTION7(BOOL, DuplicateHandle,
346 HANDLE, srcprocess,
347 HANDLE, srchandle,
348 HANDLE, destprocess,
349 PHANDLE, desthandle,
350 DWORD, arg5,
351 BOOL, arg6,
352 DWORD, arg7)
353{
354 BOOL rc;
355
356 rc = HMDuplicateHandle(srcprocess,
357 srchandle,
358 destprocess,
359 desthandle,
360 arg5,
361 arg6,
362 arg7);
363 //@@@PH: (temporary) fix for non-HandleManager handles
364 if (rc == FALSE)
365 rc = O32_DuplicateHandle(srcprocess,
366 srchandle,
367 destprocess,
368 desthandle,
369 arg5,
370 arg6,
371 arg7);
372
373 return(rc);
374}
375
376
377/*****************************************************************************
378 * Name : BOOL CreateSemaphoreA
379 * Purpose : forward call to Open32
380 * Parameters:
381 * Variables :
382 * Result :
383 * Remark : handle translation is done in CreateSemaphoreA
384 * Status :
385 *
386 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
387 *****************************************************************************/
388
389ODINFUNCTION4(HANDLE, CreateSemaphoreA,
390 LPSECURITY_ATTRIBUTES, arg1,
391 LONG, arg2,
392 LONG, arg3,
393 LPCSTR, arg4)
394{
395 return HMCreateSemaphore(arg1,
396 arg2,
397 arg3,
398 (LPSTR)arg4);
399}
400
401
402/*****************************************************************************
403 * Name : BOOL CreateSemaphoreW
404 * Purpose : forward call to Open32
405 * Parameters:
406 * Variables :
407 * Result :
408 * Remark : handle translation is done in CreateSemaphoreW
409 * Status :
410 *
411 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
412 *****************************************************************************/
413
414ODINFUNCTION4(HANDLE, CreateSemaphoreW,
415 PSECURITY_ATTRIBUTES, arg1,
416 LONG, arg2,
417 LONG, arg3,
418 LPCWSTR, arg4)
419{
420 HANDLE rc;
421 char *astring;
422
423 if (arg4 != NULL) // support for unnamed semaphores
424 astring = UnicodeToAsciiString((LPWSTR)arg4);
425 else
426 astring = NULL;
427
428 dprintf(("KERNEL32: CreateSemaphoreW(%s)\n",
429 astring));
430
431 rc = HMCreateSemaphore(arg1,
432 arg2,
433 arg3,
434 astring);
435
436 if (astring != NULL)
437 FreeAsciiString(astring);
438 return(rc);
439}
440
441
442/*****************************************************************************
443 * Name : BOOL GetOverlappedResult
444 * Purpose : forward call to Open32
445 * Parameters:
446 * Variables :
447 * Result :
448 * Remark : handle translation is done in GetOverlappedResult
449 * Status :
450 *
451 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
452 *****************************************************************************/
453
454ODINFUNCTION4(BOOL, GetOverlappedResult,
455 HANDLE, arg1,
456 LPOVERLAPPED, arg2,
457 LPDWORD, arg3,
458 BOOL, arg4)
459{
460 return HMGetOverlappedResult(arg1,
461 arg2,
462 arg3,
463 arg4);
464}
465
466
467/*****************************************************************************
468 * Name : BOOL OpenEventA
469 * Purpose : forward call to Open32
470 * Parameters:
471 * Variables :
472 * Result :
473 * Remark : handle translation is done in OpenEventA
474 * Status :
475 *
476 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
477 *****************************************************************************/
478
479ODINFUNCTION3(HANDLE, OpenEventA,
480 DWORD, arg1,
481 BOOL, arg2,
482 LPCSTR, arg3)
483{
484 dprintf(("KERNEL32: OpenEventA(%s)\n",
485 arg3));
486
487 return HMOpenEvent(arg1,
488 arg2,
489 arg3);
490}
491
492
493/*****************************************************************************
494 * Name : BOOL
495 * Purpose : forward call to Open32
496 * Parameters:
497 * Variables :
498 * Result :
499 * Remark : handle translation is done in OpenEventW
500 * Status :
501 *
502 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
503 *****************************************************************************/
504
505ODINFUNCTION3(HANDLE, OpenEventW,
506 DWORD, dwDesiredAccess,
507 BOOL, bInheritHandle,
508 LPCWSTR, lpName)
509{
510 char *asciiname;
511 HANDLE rc;
512
513 asciiname = UnicodeToAsciiString((LPWSTR)lpName);
514
515 dprintf(("KERNEL32: OpenEventW(%s)\n",
516 asciiname));
517
518 rc = HMOpenEvent(dwDesiredAccess,
519 bInheritHandle,
520 asciiname);
521 FreeAsciiString(asciiname);
522 return(rc);
523}
524
525
526/*****************************************************************************
527 * Name : BOOL OpenMutexA
528 * Purpose : forward call to Open32
529 * Parameters:
530 * Variables :
531 * Result :
532 * Remark : handle translation is done in OpenMutexA
533 * Status :
534 *
535 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
536 *****************************************************************************/
537
538ODINFUNCTION3(HANDLE, OpenMutexA,
539 DWORD, arg1,
540 BOOL, arg2,
541 LPCSTR, arg3)
542{
543 dprintf(("KERNEL32: OpenMutexA(%s)\n",
544 arg3));
545
546 return HMOpenMutex(arg1,
547 arg2,
548 arg3);
549}
550
551
552/*****************************************************************************
553 * Name : BOOL OpenMutexW
554 * Purpose : forward call to Open32
555 * Parameters:
556 * Variables :
557 * Result :
558 * Remark : handle translation is done in OpenMutexW
559 * Status :
560 *
561 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
562 *****************************************************************************/
563
564ODINFUNCTION3(HANDLE, OpenMutexW,
565 DWORD, dwDesiredAccess,
566 BOOL, bInheritHandle,
567 LPCWSTR, lpName)
568{
569 char *asciiname;
570 HANDLE rc;
571
572 asciiname = UnicodeToAsciiString((LPWSTR)lpName);
573
574 dprintf(("KERNEL32: OpenMutexW(%s)\n",
575 asciiname));
576
577 rc = HMOpenMutex(dwDesiredAccess,
578 bInheritHandle,
579 asciiname);
580 FreeAsciiString(asciiname);
581 return(rc);
582}
583
584
585/*****************************************************************************
586 * Name : BOOL OpenSemaphoreA
587 * Purpose : forward call to Open32
588 * Parameters:
589 * Variables :
590 * Result :
591 * Remark : handle translation is done in OpenSemaphoreA
592 * Status :
593 *
594 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
595 *****************************************************************************/
596
597ODINFUNCTION3(HANDLE, OpenSemaphoreA,
598 DWORD, arg1,
599 BOOL, arg2,
600 LPCSTR, arg3)
601{
602 dprintf(("KERNEL32: OpenSemaphoreA(%s)\n",
603 arg3));
604
605 return HMOpenSemaphore(arg1,
606 arg2,
607 arg3);
608}
609
610
611/*****************************************************************************
612 * Name : BOOL OpenSemaphoreW
613 * Purpose : forward call to Open32
614 * Parameters:
615 * Variables :
616 * Result :
617 * Remark : handle translation is done in OpenSemaphoreW
618 * Status :
619 *
620 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
621 *****************************************************************************/
622
623ODINFUNCTION3(HANDLE, OpenSemaphoreW,
624 DWORD, dwDesiredAccess,
625 BOOL, bInheritHandle,
626 LPCWSTR, lpName)
627{
628 char *asciiname;
629 HANDLE rc;
630
631 asciiname = UnicodeToAsciiString((LPWSTR)lpName);
632
633 dprintf(("KERNEL32: OpenSemaphoreW(%s)\n",
634 asciiname));
635
636 rc = HMOpenSemaphore(dwDesiredAccess,
637 bInheritHandle,
638 asciiname);
639 FreeAsciiString(asciiname);
640 return(rc);
641}
642
643
644/*****************************************************************************
645 * Name : BOOL PulseEvent
646 * Purpose : forward call to Open32
647 * Parameters:
648 * Variables :
649 * Result :
650 * Remark : handle translation is done in PulseEvent
651 * Status :
652 *
653 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
654 *****************************************************************************/
655
656ODINFUNCTION1(BOOL, PulseEvent,
657 HANDLE, arg1)
658{
659 return HMPulseEvent(arg1);
660}
661
662
663/*****************************************************************************
664 * Name : BOOL ReleaseSemaphore
665 * Purpose : forward call to Open32
666 * Parameters:
667 * Variables :
668 * Result :
669 * Remark : handle translation is done in ReleaseSemaphore
670 * Status :
671 *
672 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
673 *****************************************************************************/
674
675ODINFUNCTION3(BOOL, ReleaseSemaphore,
676 HANDLE, arg1,
677 LONG, arg2,
678 PLONG, arg3)
679{
680 return HMReleaseSemaphore(arg1,
681 arg2,
682 arg3);
683}
684
685
686/*****************************************************************************
687 * Name : BOOL ResetEvent
688 * Purpose : forward call to Open32
689 * Parameters:
690 * Variables :
691 * Result :
692 * Remark : handle translation is done in ResetEvent
693 * Status :
694 *
695 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
696 *****************************************************************************/
697
698ODINFUNCTION1(BOOL, ResetEvent,
699 HANDLE, arg1)
700{
701 return HMResetEvent(arg1);
702}
703
704
705/*****************************************************************************
706 * Name : BOOL WaitForMultipleObjects
707 * Purpose : forward call to Open32
708 * Parameters:
709 * Variables :
710 * Result :
711 * Remark : handle translation is done in WaitForMultipleObjects
712 * Status :
713 *
714 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
715 *****************************************************************************/
716
717ODINFUNCTION4(DWORD, WaitForMultipleObjects,
718 DWORD, arg1,
719 const HANDLE *, arg2,
720 BOOL, arg3,
721 DWORD, arg4)
722{
723 return HMWaitForMultipleObjects(arg1,
724 (PHANDLE)arg2,
725 arg3,
726 arg4);
727}
728
729
730/*****************************************************************************
731 * Name : DWORD OS2WaitForMultipleObjectsEx
732 * Purpose : The WaitForMultipleObjectsEx function is an extended wait
733 * function that can be used to perform an alertable wait. This
734 * enables the function to return when the system queues an I/O
735 * completion routine to be executed by the calling thread. The
736 * function also returns either when any one or when all of the
737 * specified objects are in the signaled state, or when the
738 * time-out interval elapses.
739 * Parameters: DWORD cObjects number of handles in handle array
740 * HANDLE *lphObjects address of object-handle array
741 * BOOL fWaitAll wait flag
742 * DWORD dwTimeout time-out interval in milliseconds
743 * BOOL fAlertable alertable wait flag
744 * Variables :
745 * Result : 0xFFFFFFFF in case of error
746 * Remark : only really required for async I/O
747 * Status : UNTESTED STUB
748 *
749 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
750 *****************************************************************************/
751
752ODINFUNCTION5(DWORD, WaitForMultipleObjectsEx,
753 DWORD, cObjects,
754 CONST HANDLE *, lphObjects,
755 BOOL, fWaitAll,
756 DWORD, dwTimeout,
757 BOOL, fAlertable)
758{
759 return(HMWaitForMultipleObjectsEx(cObjects,
760 (PHANDLE)lphObjects,
761 fWaitAll,
762 dwTimeout,
763 fAlertable));
764}
765
766
767/*****************************************************************************
768 * Name : HANDLE ConvertToGlobalHandle
769 * Purpose : forward call to Open32
770 * Parameters:
771 * Variables :
772 * Result :
773 * Remark : handle translation is done in ConvertToGlobalHandle
774 * Status :
775 *
776 * Author : Patrick Haller [Fri, 1999/06/18 03:44]
777 *****************************************************************************/
778
779ODINFUNCTION1(HANDLE, ConvertToGlobalHandle,
780 HANDLE, hHandle)
781
782//ODINFUNCTION2(HANDLE, ConvertToGlobalHandle,
783// HANDLE, hHandle,
784// BOOL, fInherit)
785{
786 return (hHandle);
787}
788
789//******************************************************************************
790//******************************************************************************
791ODINFUNCTION6(HANDLE,CreateThread,LPSECURITY_ATTRIBUTES, lpsa,
792 DWORD, cbStack,
793 LPTHREAD_START_ROUTINE, lpStartAddr,
794 LPVOID, lpvThreadParm,
795 DWORD, fdwCreate,
796 LPDWORD, lpIDThread)
797{
798 return HMCreateThread(lpsa, cbStack, lpStartAddr, lpvThreadParm, fdwCreate, lpIDThread);
799}
800//******************************************************************************
801//******************************************************************************
802INT WIN32API GetThreadPriority(HANDLE hThread)
803{
804 return HMGetThreadPriority(hThread);
805}
806//******************************************************************************
807//******************************************************************************
808DWORD WIN32API SuspendThread(HANDLE hThread)
809{
810 return HMSuspendThread(hThread);
811}
812//******************************************************************************
813//******************************************************************************
814BOOL WIN32API SetThreadPriority(HANDLE hThread, int priority)
815{
816 return HMSetThreadPriority(hThread, priority);
817}
818//******************************************************************************
819//******************************************************************************
820BOOL WIN32API GetThreadContext(HANDLE hThread, PCONTEXT lpContext)
821{
822 return HMGetThreadContext(hThread, lpContext);
823}
824//******************************************************************************
825//******************************************************************************
826BOOL WIN32API SetThreadContext(HANDLE hThread, const CONTEXT *lpContext)
827{
828 return HMSetThreadContext(hThread, lpContext);
829}
830//******************************************************************************
831//******************************************************************************
832BOOL WIN32API TerminateThread(HANDLE hThread, DWORD exitcode)
833{
834 return HMTerminateThread(hThread, exitcode);
835}
836//******************************************************************************
837//******************************************************************************
838DWORD WIN32API ResumeThread(HANDLE hThread)
839{
840 return HMResumeThread(hThread);
841}
842//******************************************************************************
843//******************************************************************************
844BOOL WIN32API GetExitCodeThread(HANDLE hThread, LPDWORD arg2)
845{
846 return HMGetExitCodeThread(hThread, arg2);
847}
848//******************************************************************************
849//******************************************************************************
Note: See TracBrowser for help on using the repository browser.