Changeset 71150 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- Feb 28, 2018 10:44:38 AM (7 years ago)
- Location:
- trunk/src/VBox/Runtime/r3/win
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/init-win.cpp
r70361 r71150 84 84 /** NtDuplicateToken (NT 3.51). */ 85 85 DECLHIDDEN(PFNNTDUPLICATETOKEN) g_pfnNtDuplicateToken = NULL; 86 /** NtAlertThread (NT 3.51). */ 87 decltype(NtAlertThread) *g_pfnNtAlertThread = NULL; 86 88 87 89 /** Either ws2_32.dll (NT4+) or wsock32.dll (NT3.x). */ … … 513 515 g_pfnNtQueryFullAttributesFile = (PFNNTQUERYFULLATTRIBUTESFILE)GetProcAddress(g_hModNtDll, "NtQueryFullAttributesFile"); 514 516 g_pfnNtDuplicateToken = (PFNNTDUPLICATETOKEN)GetProcAddress( g_hModNtDll, "NtDuplicateToken"); 515 517 g_pfnNtAlertThread = (decltype(NtAlertThread) *)GetProcAddress( g_hModNtDll, "NtAlertThread"); 516 518 517 519 /* -
trunk/src/VBox/Runtime/r3/win/internal-r3-win.h
r70345 r71150 109 109 typedef NTSTATUS (NTAPI *PFNNTDUPLICATETOKEN)(HANDLE, ACCESS_MASK, struct _OBJECT_ATTRIBUTES *, BOOLEAN, TOKEN_TYPE, PHANDLE); 110 110 extern DECLHIDDEN(PFNNTDUPLICATETOKEN) g_pfnNtDuplicateToken; 111 #ifdef ___iprt_nt_nt_h___ 112 extern decltype(NtAlertThread) *g_pfnNtAlertThread; 113 #endif 111 114 112 115 extern DECLHIDDEN(HMODULE) g_hModWinSock; -
trunk/src/VBox/Runtime/r3/win/thread-win.cpp
r71127 r71150 45 45 #include <iprt/mem.h> 46 46 #include "internal/thread.h" 47 #include "internal-r3-win.h" 47 48 48 49 … … 400 401 RT_EXPORT_SYMBOL(RTThreadGetNativeHandle); 401 402 403 404 RTDECL(int) RTThreadPoke(RTTHREAD hThread) 405 { 406 AssertReturn(hThread != RTThreadSelf(), VERR_INVALID_PARAMETER); 407 if (g_pfnNtAlertThread) 408 { 409 PRTTHREADINT pThread = rtThreadGet(hThread); 410 AssertReturn(pThread, VERR_INVALID_HANDLE); 411 412 NTSTATUS rcNt = g_pfnNtAlertThread((HANDLE)pThread->hThread); 413 414 rtThreadRelease(pThread); 415 if (NT_SUCCESS(rcNt)) 416 return VINF_SUCCESS; 417 return RTErrConvertFromErrno(rcNt); 418 } 419 return VERR_NOT_IMPLEMENTED; 420 } 421
Note:
See TracChangeset
for help on using the changeset viewer.