Lines Matching refs:handle

126 // save DLL module handle, used by GetModuleFileName
1081 dirp->handle = FindFirstFile(dirp->path, &dirp->find_data);
1082 if (dirp->handle == INVALID_HANDLE_VALUE) {
1099 if (dirp->handle == INVALID_HANDLE_VALUE) {
1105 if (!FindNextFile(dirp->handle, &dirp->find_data)) {
1110 FindClose(dirp->handle);
1111 dirp->handle = INVALID_HANDLE_VALUE;
1121 if (dirp->handle != INVALID_HANDLE_VALUE) {
1122 if (!FindClose(dirp->handle)) {
1126 dirp->handle = INVALID_HANDLE_VALUE;
1313 // Get a handle to a Toolhelp snapshot of the system
1896 HANDLE handle = GetProcessWindowStation();
1897 if (handle != NULL &&
1898 GetUserObjectInformation(handle, UOI_FLAGS, &flags,
2117 // handle exception caused by idiv; should only happen for -MinInt/-1
2125 assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands");
2136 assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands");
2150 // handle exception caused by native method modifying control word
2173 // We didn't handle this exception so pass it to the previous
2817 // instead we handle this in the bytes_to_rq computation below
3541 HANDLE handle = thread->osthread()->thread_handle();
3546 if (GetThreadContext(handle, &context)) {
3771 main_process = GetCurrentProcess(); // Remember main_process is a pseudo handle
4290 HANDLE handle = (HANDLE)::_get_osfhandle(fd);
4292 if ( (!::FlushFileBuffers(handle)) &&
4611 // An Event wraps a win32 "CreateEvent" kernel handle.
4613 // We have a number of choices regarding "CreateEvent" win32 handle leakage:
4616 // field, and call CloseHandle() on the win32 event handle. Unpark() would
4617 // need to be modified to tolerate finding a NULL (invalid) win32 event handle.
4618 // In addition, an unpark() operation might fetch the handle field, but the
4620 // SetEvent() would either fail because the handle was invalid, or inadvertently work,
4621 // as the win32 handle value had been recycled. In an ideal world calling SetEvent()
4622 // on an stale but recycled handle would be harmless, but in practice this might
4625 // 2: Once a win32 event handle is associated with an Event, it remains associated
4626 // with the Event. The event handle is never closed. This could be construed
4627 // as handle leakage, but only up to the maximum # of threads that have been extant
4647 // into a single win32 CreateEvent() handle.
4667 // CONSIDER: defer assigning a CreateEvent() handle to the Event until
5077 // retrieve a suspend/resume context capable handle
5078 // from the tid. Caller validates handle return value.
5092 // get context capable handle for thread
5112 // close handle
5189 HMODULE handle = ::GetModuleHandle("Kernel32.dll");
5190 assert(handle != NULL, "Just check");
5191 _GetLargePageMinimum = (GetLargePageMinimum_Fn)::GetProcAddress(handle, "GetLargePageMinimum");
5192 _VirtualAllocExNuma = (VirtualAllocExNuma_Fn)::GetProcAddress(handle, "VirtualAllocExNuma");
5193 _GetNumaHighestNodeNumber = (GetNumaHighestNodeNumber_Fn)::GetProcAddress(handle, "GetNumaHighestNodeNumber");
5194 _GetNumaNodeProcessorMask = (GetNumaNodeProcessorMask_Fn)::GetProcAddress(handle, "GetNumaNodeProcessorMask");
5195 _RtlCaptureStackBackTrace = (RtlCaptureStackBackTrace_Fn)::GetProcAddress(handle, "RtlCaptureStackBackTrace");
5312 HMODULE handle = ::GetModuleHandle("Kernel32.dll");
5313 assert(handle != NULL, "Just check");
5315 _SwitchToThread = (SwitchToThread_Fn)::GetProcAddress(handle, "SwitchToThread");
5317 ::GetProcAddress(handle, "CreateToolhelp32Snapshot");
5318 _Module32First = (Module32First_Fn)::GetProcAddress(handle, "Module32First");
5319 _Module32Next = (Module32Next_Fn)::GetProcAddress(handle, "Module32Next");
5320 _GetNativeSystemInfo = (GetNativeSystemInfo_Fn)::GetProcAddress(handle, "GetNativeSystemInfo");
5401 HMODULE handle = os::win32::load_Windows_dll("PSAPI.DLL", NULL, 0);
5402 if (handle != NULL) {
5403 _EnumProcessModules = (EnumProcessModules_Fn)::GetProcAddress(handle,
5405 _GetModuleFileNameEx = (GetModuleFileNameEx_Fn)::GetProcAddress(handle,
5407 _GetModuleInformation = (GetModuleInformation_Fn)::GetProcAddress(handle,
5454 HMODULE handle = os::win32::load_Windows_dll("ws2_32.dll", NULL, 0);
5455 if (handle != NULL) {
5456 _WSAStartup = (WSAStartup_Fn)::GetProcAddress(handle, "WSAStartup");
5457 _gethostbyname = (gethostbyname_Fn)::GetProcAddress(handle, "gethostbyname");
5495 HMODULE handle = os::win32::load_Windows_dll("advapi32.dll", NULL, 0);
5496 if (handle != NULL) {
5497 _AdjustTokenPrivileges = (AdjustTokenPrivileges_Fn)::GetProcAddress(handle,
5499 _OpenProcessToken = (OpenProcessToken_Fn)::GetProcAddress(handle,
5501 _LookupPrivilegeValue = (LookupPrivilegeValue_Fn)::GetProcAddress(handle,