public static bool GetHandleType(IntPtr handle, int processId, out SystemHandleType handleType) { string token = GetHandleTypeToken(handle, processId); if (handleTypeTokens.ContainsKey(token)) { handleType = handleTypeTokens[token]; return(true); } handleType = SystemHandleType.Unknown; return(false); }
private static bool GetHandleTypeFromToken(string token, out SystemHandleType handleType) { for (int i = 1; i < handleTypeTokenCount; i++) { if (handleTypeTokens[i] == token) { handleType = (SystemHandleType)i; return(true); } } handleType = SystemHandleType.OB_TYPE_UNKNOWN; return(false); }
private static bool GetHandleType(IntPtr handle, out SystemHandleType handleType) { string token = GetHandleTypeToken(handle); return(GetHandleTypeFromToken(token, out handleType)); }