VirtualBox

source: vbox/trunk/src/VBox/Runtime/r3/win/internal-r3-win.h@ 70195

最後變更 在這個檔案從70195是 70195,由 vboxsync 提交於 7 年 前

IPRT/R3: Made the core work on NT 3.51 (still experimental).

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 9.0 KB
 
1/* $Id: internal-r3-win.h 70195 2017-12-18 13:40:26Z vboxsync $ */
2/** @file
3 * IPRT - some Windows OS type constants.
4 */
5
6/*
7 * Copyright (C) 2013-2017 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27
28#ifndef ___internal_r3_win_h
29#define ___internal_r3_win_h
30
31#include "internal/iprt.h"
32#include <iprt/types.h>
33
34
35/*******************************************************************************
36* Structures and Typedefs *
37*******************************************************************************/
38/**
39 * Windows OS type as determined by rtSystemWinOSType().
40 *
41 * @note ASSUMPTIONS are made regarding ordering. Win 9x should come first, then
42 * NT. The Win9x and NT versions should internally be ordered in ascending
43 * version/code-base order.
44 */
45typedef enum RTWINOSTYPE
46{
47 kRTWinOSType_UNKNOWN = 0,
48 kRTWinOSType_9XFIRST = 1,
49 kRTWinOSType_95 = kRTWinOSType_9XFIRST,
50 kRTWinOSType_95SP1,
51 kRTWinOSType_95OSR2,
52 kRTWinOSType_98,
53 kRTWinOSType_98SP1,
54 kRTWinOSType_98SE,
55 kRTWinOSType_ME,
56 kRTWinOSType_9XLAST = 99,
57 kRTWinOSType_NTFIRST = 100,
58 kRTWinOSType_NT31 = kRTWinOSType_NTFIRST,
59 kRTWinOSType_NT351,
60 kRTWinOSType_NT4,
61 kRTWinOSType_2K, /* 5.0 */
62 kRTWinOSType_XP, /* 5.1 */
63 kRTWinOSType_XP64, /* 5.2, workstation */
64 kRTWinOSType_2003, /* 5.2 */
65 kRTWinOSType_VISTA, /* 6.0, workstation */
66 kRTWinOSType_2008, /* 6.0, server */
67 kRTWinOSType_7, /* 6.1, workstation */
68 kRTWinOSType_2008R2, /* 6.1, server */
69 kRTWinOSType_8, /* 6.2, workstation */
70 kRTWinOSType_2012, /* 6.2, server */
71 kRTWinOSType_81, /* 6.3, workstation */
72 kRTWinOSType_2012R2, /* 6.3, server */
73 kRTWinOSType_10, /* 10.0, workstation */
74 kRTWinOSType_2016, /* 10.0, server */
75 kRTWinOSType_NT_UNKNOWN = 199,
76 kRTWinOSType_NT_LAST = kRTWinOSType_UNKNOWN
77} RTWINOSTYPE;
78
79/**
80 * Windows loader protection level.
81 */
82typedef enum RTR3WINLDRPROT
83{
84 RTR3WINLDRPROT_INVALID = 0,
85 RTR3WINLDRPROT_NONE,
86 RTR3WINLDRPROT_NO_CWD,
87 RTR3WINLDRPROT_SAFE,
88 RTR3WINLDRPROT_SAFER
89} RTR3WINLDRPROT;
90
91
92/*******************************************************************************
93* Global Variables *
94*******************************************************************************/
95extern DECLHIDDEN(RTR3WINLDRPROT) g_enmWinLdrProt;
96extern DECLHIDDEN(RTWINOSTYPE) g_enmWinVer;
97#ifdef _WINDEF_
98extern DECLHIDDEN(HMODULE) g_hModKernel32;
99extern DECLHIDDEN(HMODULE) g_hModNtDll;
100
101extern DECLHIDDEN(OSVERSIONINFOEXW) g_WinOsInfoEx;
102typedef UINT (WINAPI *PFNGETWINSYSDIR)(LPWSTR,UINT);
103extern DECLHIDDEN(PFNGETWINSYSDIR) g_pfnGetSystemWindowsDirectoryW;
104typedef NTSTATUS (NTAPI *PFNNTQUERYFULLATTRIBUTESFILE)(struct _OBJECT_ATTRIBUTES *, struct _FILE_NETWORK_OPEN_INFORMATION *);
105extern DECLHIDDEN(PFNNTQUERYFULLATTRIBUTESFILE) g_pfnNtQueryFullAttributesFile;
106typedef NTSTATUS (NTAPI *PFNNTDUPLICATETOKEN)(HANDLE, ACCESS_MASK, struct _OBJECT_ATTRIBUTES *, BOOLEAN, TOKEN_TYPE, PHANDLE);
107extern DECLHIDDEN(PFNNTDUPLICATETOKEN) g_pfnNtDuplicateToken;
108
109extern DECLHIDDEN(HMODULE) g_hModWinSock;
110
111/** WSAStartup */
112typedef int (WINAPI *PFNWSASTARTUP)(WORD, struct WSAData *);
113/** WSACleanup */
114typedef int (WINAPI *PFNWSACLEANUP)(void);
115/** WSAGetLastError */
116typedef int (WINAPI *PFNWSAGETLASTERROR)(void);
117/** WSASetLastError */
118typedef int (WINAPI *PFNWSASETLASTERROR)(int);
119/** WSACreateEvent */
120typedef HANDLE (WINAPI *PFNWSACREATEEVENT)(void);
121/** WSACloseEvent */
122typedef BOOL (WINAPI *PFNWSACLOSEEVENT)(HANDLE);
123/** WSAEventSelect */
124typedef BOOL (WINAPI *PFNWSAEVENTSELECT)(UINT_PTR, HANDLE, LONG);
125/** WSAEnumNetworkEvents */
126typedef int (WINAPI *PFNWSAENUMNETWORKEVENTS)(UINT_PTR, HANDLE, struct _WSANETWORKEVENTS *);
127/** WSASend */
128typedef int (WINAPI *PFNWSASend)(UINT_PTR, struct _WSABUF *, DWORD, LPDWORD, DWORD dwFlags, struct _OVERLAPPED *, PFNRT /*LPWSAOVERLAPPED_COMPLETION_ROUTINE*/);
129
130/** socket */
131typedef UINT_PTR (WINAPI *PFNWINSOCKSOCKET)(int, int, int);
132/** closesocket */
133typedef int (WINAPI *PFNWINSOCKCLOSESOCKET)(UINT_PTR);
134/** recv */
135typedef int (WINAPI *PFNWINSOCKRECV)(UINT_PTR, char *, int, int);
136/** send */
137typedef int (WINAPI *PFNWINSOCKSEND)(UINT_PTR, const char *, int, int);
138/** recvfrom */
139typedef int (WINAPI *PFNWINSOCKRECVFROM)(UINT_PTR, char *, int, int, struct sockaddr *, int *);
140/** sendto */
141typedef int (WINAPI *PFNWINSOCKSENDTO)(UINT_PTR, const char *, int, int, const struct sockaddr *, int);
142/** bind */
143typedef int (WINAPI *PFNWINSOCKBIND)(UINT_PTR, const struct sockaddr *, int);
144/** listen */
145typedef int (WINAPI *PFNWINSOCKLISTEN)(UINT_PTR, int);
146/** accept */
147typedef UINT_PTR (WINAPI *PFNWINSOCKACCEPT)(UINT_PTR, struct sockaddr *, int *);
148/** connect */
149typedef int (WINAPI *PFNWINSOCKCONNECT)(UINT_PTR, const struct sockaddr *, int);
150/** shutdown */
151typedef int (WINAPI *PFNWINSOCKSHUTDOWN)(UINT_PTR, int);
152/** getsockopt */
153typedef int (WINAPI *PFNWINSOCKGETSOCKOPT)(UINT_PTR, int, int, char *, int *);
154/** setsockopt */
155typedef int (WINAPI *PFNWINSOCKSETSOCKOPT)(UINT_PTR, int, int, const char *, int);
156/** ioctlsocket */
157typedef int (WINAPI *PFNWINSOCKIOCTLSOCKET)(UINT_PTR, long, unsigned long *);
158/** getpeername */
159typedef int (WINAPI *PFNWINSOCKGETPEERNAME)(UINT_PTR, struct sockaddr *, int *);
160/** getsockname */
161typedef int (WINAPI *PFNWINSOCKGETSOCKNAME)(UINT_PTR, struct sockaddr *, int *);
162/** __WSAFDIsSet */
163typedef int (WINAPI *PFNWINSOCK__WSAFDISSET)(UINT_PTR, struct fd_set *);
164/** select */
165typedef int (WINAPI *PFNWINSOCKSELECT)(int, struct fd_set *, struct fd_set *, struct fd_set *, const struct timeval *);
166/** gethostbyname */
167typedef struct hostent *(WINAPI *PFNWINSOCKGETHOSTBYNAME)(const char *);
168
169extern DECLHIDDEN(PFNWSASTARTUP) g_pfnWSAStartup;
170extern DECLHIDDEN(PFNWSACLEANUP) g_pfnWSACleanup;
171extern PFNWSAGETLASTERROR g_pfnWSAGetLastError;
172extern PFNWSASETLASTERROR g_pfnWSASetLastError;
173extern DECLHIDDEN(PFNWSACREATEEVENT) g_pfnWSACreateEvent;
174extern DECLHIDDEN(PFNWSACLOSEEVENT) g_pfnWSACloseEvent;
175extern DECLHIDDEN(PFNWSAEVENTSELECT) g_pfnWSAEventSelect;
176extern DECLHIDDEN(PFNWSAENUMNETWORKEVENTS) g_pfnWSAEnumNetworkEvents;
177extern DECLHIDDEN(PFNWSASend) g_pfnWSASend;
178extern DECLHIDDEN(PFNWINSOCKSOCKET) g_pfnsocket;
179extern DECLHIDDEN(PFNWINSOCKCLOSESOCKET) g_pfnclosesocket;
180extern DECLHIDDEN(PFNWINSOCKRECV) g_pfnrecv;
181extern DECLHIDDEN(PFNWINSOCKSEND) g_pfnsend;
182extern DECLHIDDEN(PFNWINSOCKRECVFROM) g_pfnrecvfrom;
183extern DECLHIDDEN(PFNWINSOCKSENDTO) g_pfnsendto;
184extern DECLHIDDEN(PFNWINSOCKBIND) g_pfnbind;
185extern DECLHIDDEN(PFNWINSOCKLISTEN) g_pfnlisten;
186extern DECLHIDDEN(PFNWINSOCKACCEPT) g_pfnaccept;
187extern DECLHIDDEN(PFNWINSOCKCONNECT) g_pfnconnect;
188extern DECLHIDDEN(PFNWINSOCKSHUTDOWN) g_pfnshutdown;
189extern DECLHIDDEN(PFNWINSOCKGETSOCKOPT) g_pfngetsockopt;
190extern DECLHIDDEN(PFNWINSOCKSETSOCKOPT) g_pfnsetsockopt;
191extern DECLHIDDEN(PFNWINSOCKIOCTLSOCKET) g_pfnioctlsocket;
192extern DECLHIDDEN(PFNWINSOCKGETPEERNAME) g_pfngetpeername;
193extern DECLHIDDEN(PFNWINSOCKGETSOCKNAME) g_pfngetsockname;
194extern DECLHIDDEN(PFNWINSOCK__WSAFDISSET) g_pfn__WSAFDIsSet;
195extern DECLHIDDEN(PFNWINSOCKSELECT) g_pfnselect;
196extern DECLHIDDEN(PFNWINSOCKGETHOSTBYNAME) g_pfngethostbyname;
197#endif
198
199
200#endif
201
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette