Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1613 lines
47 KiB

  1. //========= Copyright � 1996-2004, Valve LLC, All rights reserved. ============
  2. //
  3. // Purpose: XBox win32 replacements - Mocks trivial windows flow
  4. //
  5. //=============================================================================
  6. #pragma once
  7. typedef unsigned long REGSAM;
  8. #define D3DCREATE_MULTITHREADED 0
  9. #define DSBCAPS_LOCSOFTWARE 0
  10. #define DSERR_BUFFERLOST 0
  11. #define DSBSTATUS_BUFFERLOST 0x02
  12. #define DSSPEAKER_GEOMETRY(x) (((x)>>16) & 0xFFFF)
  13. #define DSSPEAKER_CONFIG(x) ((x) & 0xFFFF)
  14. #define DSSPEAKER_HEADPHONE -1
  15. #define DSSPEAKER_QUAD -2
  16. #define DSSPEAKER_5POINT1 -3
  17. #define DSSPEAKER_7POINT1 -4
  18. #define DISP_CHANGE_SUCCESSFUL 0
  19. #define HKEY_CURRENT_USER NULL
  20. #define HKEY_LOCAL_MACHINE NULL
  21. #define KEY_QUERY_VALUE 0
  22. #define KEY_READ 0
  23. #define KEY_WRITE 1
  24. #define KEY_ALL_ACCESS ((ULONG)-1)
  25. #define SMTO_ABORTIFHUNG 0
  26. #define JOY_RETURNX 0x01
  27. #define JOY_RETURNY 0x02
  28. #define JOY_RETURNZ 0x04
  29. #define JOY_RETURNR 0x08
  30. #define JOY_RETURNU 0x10
  31. #define JOY_RETURNV 0x20
  32. #define JOYCAPS_HASPOV 0x01
  33. #define JOYCAPS_HASU 0x01
  34. #define JOYCAPS_HASV 0x01
  35. #define JOYCAPS_HASR 0x01
  36. #define JOYCAPS_HASZ 0x01
  37. #define MMSYSERR_NODRIVER 1
  38. #define JOYERR_NOERROR 0
  39. #define JOY_RETURNCENTERED 0
  40. #define JOY_RETURNBUTTONS 0
  41. #define JOY_RETURNPOV 0
  42. #define JOY_POVCENTERED 0
  43. #define JOY_POVFORWARD 0
  44. #define JOY_POVRIGHT 0
  45. #define JOY_POVBACKWARD 0
  46. #define JOY_POVLEFT 0
  47. #define CCHDEVICENAME 32
  48. #define CCHFORMNAME 32
  49. typedef WCHAR BCHAR;
  50. typedef UINT MMRESULT;
  51. #define IDLE_PRIORITY_CLASS 1
  52. #define HIGH_PRIORITY_CLASS 2
  53. typedef struct _devicemode {
  54. BCHAR dmDeviceName[CCHDEVICENAME];
  55. WORD dmSpecVersion;
  56. WORD dmDriverVersion;
  57. WORD dmSize;
  58. WORD dmDriverExtra;
  59. DWORD dmFields;
  60. union u1 {
  61. struct s {
  62. short dmOrientation;
  63. short dmPaperSize;
  64. short dmPaperLength;
  65. short dmPaperWidth;
  66. short dmScale;
  67. short dmCopies;
  68. short dmDefaultSource;
  69. short dmPrintQuality;
  70. };
  71. POINTL dmPosition;
  72. DWORD dmDisplayOrientation;
  73. DWORD dmDisplayFixedOutput;
  74. };
  75. short dmColor;
  76. short dmDuplex;
  77. short dmYResolution;
  78. short dmTTOption;
  79. short dmCollate;
  80. BYTE dmFormName[CCHFORMNAME];
  81. WORD dmLogPixels;
  82. DWORD dmBitsPerPel;
  83. DWORD dmPelsWidth;
  84. DWORD dmPelsHeight;
  85. union u2 {
  86. DWORD dmDisplayFlags;
  87. DWORD dmNup;
  88. };
  89. DWORD dmDisplayFrequency;
  90. DWORD dmICMMethod;
  91. DWORD dmICMIntent;
  92. DWORD dmMediaType;
  93. DWORD dmDitherType;
  94. DWORD dmReserved1;
  95. DWORD dmReserved2;
  96. DWORD dmPanningWidth;
  97. DWORD dmPanningHeight;
  98. } DEVMODE, *LPDEVMODE;
  99. typedef DWORD MCIERROR;
  100. typedef UINT MCIDEVICEID;
  101. typedef struct {
  102. DWORD_PTR dwCallback;
  103. } MCI_GENERIC_PARMS;
  104. typedef struct {
  105. DWORD_PTR dwCallback;
  106. DWORD dwReturn;
  107. DWORD dwItem;
  108. DWORD dwTrack;
  109. } MCI_STATUS_PARMS;
  110. typedef struct {
  111. DWORD_PTR dwCallback;
  112. DWORD dwFrom;
  113. DWORD dwTo;
  114. } MCI_PLAY_PARMS;
  115. typedef struct {
  116. DWORD_PTR dwCallback;
  117. MCIDEVICEID wDeviceID;
  118. LPCSTR lpstrDeviceType;
  119. LPCSTR lpstrElementName;
  120. LPCSTR lpstrAlias;
  121. } MCI_OPEN_PARMS;
  122. typedef struct {
  123. DWORD_PTR dwCallback;
  124. DWORD dwTimeFormat;
  125. DWORD dwAudio;
  126. } MCI_SET_PARMS;
  127. #define MCI_MAKE_TMSF(t, m, s, f) ((DWORD)(((BYTE)(t) | ((WORD)(m) << 8)) | ((DWORD)(BYTE)(s) | ((WORD)(f)<<8)) << 16))
  128. #define MCI_MSF_MINUTE(msf) ((BYTE)(msf))
  129. #define MCI_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8))
  130. #define MCI_OPEN 0
  131. #define MCI_OPEN_TYPE 0
  132. #define MCI_OPEN_SHAREABLE 0
  133. #define MCI_FORMAT_TMSF 0
  134. #define MCI_SET_TIME_FORMAT 0
  135. #define MCI_CLOSE 0
  136. #define MCI_STOP 0
  137. #define MCI_PAUSE 0
  138. #define MCI_PLAY 0
  139. #define MCI_SET 0
  140. #define MCI_SET_DOOR_OPEN 0
  141. #define MCI_SET_DOOR_CLOSED 0
  142. #define MCI_STATUS_READY 0
  143. #define MCI_STATUS 0
  144. #define MCI_STATUS_ITEM 0
  145. #define MCI_STATUS_WAIT 0
  146. #define MCI_STATUS_NUMBER_OF_TRACKS 0
  147. #define MCI_CDA_STATUS_TYPE_TRACK 0
  148. #define MCI_TRACK 0
  149. #define MCI_WAIT 0
  150. #define MCI_CDA_TRACK_AUDIO 0
  151. #define MCI_STATUS_LENGTH 0
  152. #define MCI_NOTIFY 0
  153. #define MCI_FROM 0
  154. #define MCI_TO 0
  155. #define MCIERR_DRIVER -1
  156. #define DSERR_ALLOCATED 0
  157. typedef struct _STARTUPINFOW {
  158. DWORD cb;
  159. LPWSTR lpReserved;
  160. LPWSTR lpDesktop;
  161. LPWSTR lpTitle;
  162. DWORD dwX;
  163. DWORD dwY;
  164. DWORD dwXSize;
  165. DWORD dwYSize;
  166. DWORD dwXCountChars;
  167. DWORD dwYCountChars;
  168. DWORD dwFillAttribute;
  169. DWORD dwFlags;
  170. WORD wShowWindow;
  171. WORD cbReserved2;
  172. LPBYTE lpReserved2;
  173. HANDLE hStdInput;
  174. HANDLE hStdOutput;
  175. HANDLE hStdError;
  176. } STARTUPINFOW, *LPSTARTUPINFOW;
  177. typedef STARTUPINFOW STARTUPINFO;
  178. typedef LPSTARTUPINFOW LPSTARTUPINFO;
  179. typedef struct _PROCESS_INFORMATION {
  180. HANDLE hProcess;
  181. HANDLE hThread;
  182. DWORD dwProcessId;
  183. DWORD dwThreadId;
  184. } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
  185. typedef DWORD HWAVEOUT, *LPHWAVEOUT;
  186. #if 0
  187. typedef struct adpcmcoef_tag {
  188. short iCoef1;
  189. short iCoef2;
  190. } ADPCMCOEFSET;
  191. typedef struct adpcmwaveformat_tag {
  192. WAVEFORMATEX wfx;
  193. WORD wSamplesPerBlock;
  194. WORD wNumCoef;
  195. ADPCMCOEFSET aCoef[1];
  196. } ADPCMWAVEFORMAT;
  197. #endif
  198. typedef struct {
  199. LPSTR lpData;
  200. DWORD dwBufferLength;
  201. DWORD dwBytesRecorded;
  202. DWORD_PTR dwUser;
  203. DWORD dwFlags;
  204. DWORD dwLoops;
  205. struct wavehdr_tag * lpNext;
  206. DWORD_PTR reserved;
  207. } WAVEHDR, *LPWAVEHDR;
  208. typedef struct {
  209. DWORD dwSize;
  210. DWORD dwFlags;
  211. DWORD dwBufferBytes;
  212. DWORD dwUnlockTransferRate;
  213. DWORD dwPlayCpuOverhead;
  214. } DSBCAPS, *LPDSBCAPS;
  215. typedef struct _DSCEFFECTDESC
  216. {
  217. DWORD dwSize;
  218. DWORD dwFlags;
  219. GUID guidDSCFXClass;
  220. GUID guidDSCFXInstance;
  221. DWORD dwReserved1;
  222. DWORD dwReserved2;
  223. } DSCEFFECTDESC, *LPDSCEFFECTDESC;
  224. typedef struct _DSCBUFFERDESC
  225. {
  226. DWORD dwSize;
  227. DWORD dwFlags;
  228. DWORD dwBufferBytes;
  229. DWORD dwReserved;
  230. LPWAVEFORMATEX lpwfxFormat;
  231. DWORD dwFXCount;
  232. LPDSCEFFECTDESC lpDSCFXDesc;
  233. } DSCBUFFERDESC, *LPDSCBUFFERDESC;
  234. #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
  235. typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
  236. typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
  237. typedef char* HPSTR;
  238. typedef struct tagPAINTSTRUCT {
  239. HDC hdc;
  240. BOOL fErase;
  241. RECT rcPaint;
  242. BOOL fRestore;
  243. BOOL fIncUpdate;
  244. BYTE rgbReserved[16];
  245. } PAINTSTRUCT, *LPPAINTSTRUCT;
  246. typedef struct tagMSG {
  247. HWND hwnd;
  248. UINT message;
  249. WPARAM wParam;
  250. LPARAM lParam;
  251. DWORD time;
  252. POINT pt;
  253. } MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
  254. typedef struct {
  255. UINT style;
  256. WNDPROC lpfnWndProc;
  257. int cbClsExtra;
  258. int cbWndExtra;
  259. HINSTANCE hInstance;
  260. HICON hIcon;
  261. HCURSOR hCursor;
  262. HBRUSH hbrBackground;
  263. LPCTSTR lpszMenuName;
  264. LPCTSTR lpszClassName;
  265. } WNDCLASS, *PWNDCLASS;
  266. typedef struct {
  267. UINT style;
  268. WNDPROC lpfnWndProc;
  269. int cbClsExtra;
  270. int cbWndExtra;
  271. HINSTANCE hInstance;
  272. HICON hIcon;
  273. HCURSOR hCursor;
  274. HBRUSH hbrBackground;
  275. LPCWSTR lpszMenuName;
  276. LPCWSTR lpszClassName;
  277. } WNDCLASSW, *PWNDCLASSW;
  278. typedef struct {
  279. UINT cbSize;
  280. UINT style;
  281. WNDPROC lpfnWndProc;
  282. int cbClsExtra;
  283. int cbWndExtra;
  284. HINSTANCE hInstance;
  285. HICON hIcon;
  286. HCURSOR hCursor;
  287. HBRUSH hbrBackground;
  288. LPCTSTR lpszMenuName;
  289. LPCTSTR lpszClassName;
  290. HICON hIconSm;
  291. } WNDCLASSEX, *PWNDCLASSEX;
  292. typedef struct tagTEXTMETRIC {
  293. LONG tmHeight;
  294. LONG tmAscent;
  295. LONG tmDescent;
  296. LONG tmInternalLeading;
  297. LONG tmExternalLeading;
  298. LONG tmAveCharWidth;
  299. LONG tmMaxCharWidth;
  300. LONG tmWeight;
  301. LONG tmOverhang;
  302. LONG tmDigitizedAspectX;
  303. LONG tmDigitizedAspectY;
  304. TCHAR tmFirstChar;
  305. TCHAR tmLastChar;
  306. TCHAR tmDefaultChar;
  307. TCHAR tmBreakChar;
  308. BYTE tmItalic;
  309. BYTE tmUnderlined;
  310. BYTE tmStruckOut;
  311. BYTE tmPitchAndFamily;
  312. BYTE tmCharSet;
  313. } TEXTMETRIC, *PTEXTMETRIC;
  314. typedef struct _ABC {
  315. int abcA;
  316. UINT abcB;
  317. int abcC;
  318. } ABC, *PABC;
  319. typedef struct tagRGBQUAD {
  320. BYTE rgbBlue;
  321. BYTE rgbGreen;
  322. BYTE rgbRed;
  323. BYTE rgbReserved;
  324. } RGBQUAD;
  325. typedef struct tagBITMAP
  326. {
  327. LONG bmType;
  328. LONG bmWidth;
  329. LONG bmHeight;
  330. LONG bmWidthBytes;
  331. WORD bmPlanes;
  332. WORD bmBitsPixel;
  333. LPVOID bmBits;
  334. } BITMAP, *PBITMAP, NEAR *NPBITMAP, FAR *LPBITMAP;
  335. typedef struct tagBITMAPINFOHEADER{
  336. DWORD biSize;
  337. LONG biWidth;
  338. LONG biHeight;
  339. WORD biPlanes;
  340. WORD biBitCount;
  341. DWORD biCompression;
  342. DWORD biSizeImage;
  343. LONG biXPelsPerMeter;
  344. LONG biYPelsPerMeter;
  345. DWORD biClrUsed;
  346. DWORD biClrImportant;
  347. } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
  348. typedef struct tagBITMAPINFO {
  349. BITMAPINFOHEADER bmiHeader;
  350. RGBQUAD bmiColors[1];
  351. } BITMAPINFO, *PBITMAPINFO, *LPBITMAPINFO;
  352. typedef struct tagBITMAPFILEHEADER {
  353. WORD bfType;
  354. DWORD bfSize;
  355. WORD bfReserved1;
  356. WORD bfReserved2;
  357. DWORD bfOffBits;
  358. } BITMAPFILEHEADER, *PBITMAPFILEHEADER;
  359. typedef struct tagRGBTRIPLE {
  360. BYTE rgbtBlue;
  361. BYTE rgbtGreen;
  362. BYTE rgbtRed;
  363. } RGBTRIPLE;
  364. typedef struct tagBITMAPCOREHEADER {
  365. DWORD bcSize;
  366. WORD bcWidth;
  367. WORD bcHeight;
  368. WORD bcPlanes;
  369. WORD bcBitCount;
  370. } BITMAPCOREHEADER, *PBITMAPCOREHEADER;
  371. typedef struct _BITMAPCOREINFO {
  372. BITMAPCOREHEADER bmciHeader;
  373. RGBTRIPLE bmciColors[1];
  374. } BITMAPCOREINFO, *PBITMAPCOREINFO, *LPBITMAPCOREINFO;
  375. typedef struct _OSVERSIONINFO
  376. {
  377. DWORD dwOSVersionInfoSize;
  378. DWORD dwMajorVersion;
  379. DWORD dwMinorVersion;
  380. DWORD dwBuildNumber;
  381. DWORD dwPlatformId;
  382. TCHAR szCSDVersion[128];
  383. } OSVERSIONINFO, *LPOSVERSIONINFO;
  384. typedef struct _OSVERSIONINFOEX
  385. {
  386. DWORD dwOSVersionInfoSize;
  387. DWORD dwMajorVersion;
  388. DWORD dwMinorVersion;
  389. DWORD dwBuildNumber;
  390. DWORD dwPlatformId;
  391. TCHAR szCSDVersion[128];
  392. WORD wServicePackMajor;
  393. WORD wServicePackMinor;
  394. WORD wSuiteMask;
  395. BYTE wProductType;
  396. BYTE wReserved;
  397. } OSVERSIONINFOEX, *POSVERSIONINFOEX, *LPOSVERSIONINFOEX;
  398. typedef enum {
  399. INTERNET_SCHEME_PARTIAL = -2,
  400. INTERNET_SCHEME_UNKNOWN = -1,
  401. INTERNET_SCHEME_DEFAULT = 0,
  402. INTERNET_SCHEME_FTP,
  403. INTERNET_SCHEME_GOPHER,
  404. INTERNET_SCHEME_HTTP,
  405. INTERNET_SCHEME_HTTPS,
  406. INTERNET_SCHEME_FILE,
  407. INTERNET_SCHEME_NEWS,
  408. INTERNET_SCHEME_MAILTO,
  409. INTERNET_SCHEME_SOCKS,
  410. INTERNET_SCHEME_JAVASCRIPT,
  411. INTERNET_SCHEME_VBSCRIPT,
  412. INTERNET_SCHEME_ABOUT,
  413. INTERNET_SCHEME_RES,
  414. INTERNET_SCHEME_FIRST = INTERNET_SCHEME_FTP,
  415. INTERNET_SCHEME_LAST = INTERNET_SCHEME_VBSCRIPT
  416. } INTERNET_SCHEME, * LPINTERNET_SCHEME;
  417. typedef struct {
  418. DWORD dwStructSize;
  419. LPTSTR lpszScheme;
  420. DWORD dwSchemeLength;
  421. INTERNET_SCHEME nScheme;
  422. LPTSTR lpszHostName;
  423. DWORD dwHostNameLength;
  424. UINT nPort;
  425. LPTSTR lpszUserName;
  426. DWORD dwUserNameLength;
  427. LPTSTR lpszPassword;
  428. DWORD dwPasswordLength;
  429. LPTSTR lpszUrlPath;
  430. DWORD dwUrlPathLength;
  431. LPTSTR lpszExtraInfo;
  432. DWORD dwExtraInfoLength;
  433. } URL_COMPONENTS, *LPURL_COMPONENTS;
  434. typedef struct _COORD
  435. {
  436. SHORT X;
  437. SHORT Y;
  438. } COORD, *PCOORD;
  439. typedef struct _SMALL_RECT
  440. {
  441. SHORT Left;
  442. SHORT Top;
  443. SHORT Right;
  444. SHORT Bottom;
  445. } SMALL_RECT;
  446. typedef struct _CONSOLE_SCREEN_BUFFER_INFO
  447. {
  448. COORD dwSize;
  449. COORD dwCursorPosition;
  450. WORD wAttributes;
  451. SMALL_RECT srWindow;
  452. COORD dwMaximumWindowSize;
  453. } CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO;
  454. typedef struct _WINDOW_BUFFER_SIZE_RECORD
  455. {
  456. COORD dwSize;
  457. } WINDOW_BUFFER_SIZE_RECORD, *PWINDOW_BUFFER_SIZE_RECORD;
  458. typedef struct _MENU_EVENT_RECORD
  459. {
  460. UINT dwCommandId;
  461. } MENU_EVENT_RECORD, *PMENU_EVENT_RECORD;
  462. typedef struct _FOCUS_EVENT_RECORD
  463. {
  464. BOOL bSetFocus;
  465. } FOCUS_EVENT_RECORD, *PFOCUS_EVENT_RECORD;
  466. typedef struct _KEY_EVENT_RECORD
  467. {
  468. BOOL bKeyDown;
  469. WORD wRepeatCount;
  470. WORD wVirtualKeyCode;
  471. WORD wVirtualScanCode;
  472. union {
  473. WCHAR UnicodeChar;
  474. CHAR AsciiChar;
  475. } uChar;
  476. DWORD dwControlKeyState;
  477. } KEY_EVENT_RECORD, *PKEY_EVENT_RECORD;
  478. typedef struct _MOUSE_EVENT_RECORD
  479. {
  480. COORD dwMousePosition;
  481. DWORD dwButtonState;
  482. DWORD dwControlKeyState;
  483. DWORD dwEventFlags;
  484. } MOUSE_EVENT_RECORD, *PMOUSE_EVENT_RECORD;
  485. typedef struct _INPUT_RECORD
  486. {
  487. WORD EventType;
  488. union {
  489. KEY_EVENT_RECORD KeyEvent;
  490. MOUSE_EVENT_RECORD MouseEvent;
  491. WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
  492. MENU_EVENT_RECORD MenuEvent;
  493. FOCUS_EVENT_RECORD FocusEvent;
  494. } Event;
  495. } INPUT_RECORD, *PINPUT_RECORD;
  496. typedef GUID UUID;
  497. #define MAXPNAMELEN 32
  498. #define MAX_JOYSTICKOEMVXDNAME 260
  499. typedef struct
  500. {
  501. WORD wMid;
  502. WORD wPid;
  503. CHAR szPname[MAXPNAMELEN];
  504. UINT wXmin;
  505. UINT wXmax;
  506. UINT wYmin;
  507. UINT wYmax;
  508. UINT wZmin;
  509. UINT wZmax;
  510. UINT wNumButtons;
  511. UINT wPeriodMin;
  512. UINT wPeriodMax;
  513. UINT wRmin;
  514. UINT wRmax;
  515. UINT wUmin;
  516. UINT wUmax;
  517. UINT wVmin;
  518. UINT wVmax;
  519. UINT wCaps;
  520. UINT wMaxAxes;
  521. UINT wNumAxes;
  522. UINT wMaxButtons;
  523. CHAR szRegKey[MAXPNAMELEN];
  524. CHAR szOEMVxD[MAX_JOYSTICKOEMVXDNAME];
  525. } JOYCAPS, *LPJOYCAPS;
  526. typedef struct joyinfoex_tag
  527. {
  528. DWORD dwSize;
  529. DWORD dwFlags;
  530. DWORD dwXpos;
  531. DWORD dwYpos;
  532. DWORD dwZpos;
  533. DWORD dwRpos;
  534. DWORD dwUpos;
  535. DWORD dwVpos;
  536. DWORD dwButtons;
  537. DWORD dwButtonNumber;
  538. DWORD dwPOV;
  539. DWORD dwReserved1;
  540. DWORD dwReserved2;
  541. } JOYINFOEX, *LPJOYINFOEX;
  542. typedef struct _MEMORYSTATUSEX
  543. {
  544. DWORD dwLength;
  545. DWORD dwMemoryLoad;
  546. DWORDLONG ullTotalPhys;
  547. DWORDLONG ullAvailPhys;
  548. DWORDLONG ullTotalPageFile;
  549. DWORDLONG ullAvailPageFile;
  550. DWORDLONG ullTotalVirtual;
  551. DWORDLONG ullAvailVirtual;
  552. DWORDLONG ullAvailExtendedVirtual;
  553. } MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
  554. typedef struct tagCOPYDATASTRUCT
  555. {
  556. ULONG_PTR dwData;
  557. DWORD cbData;
  558. PVOID lpData;
  559. } COPYDATASTRUCT, *PCOPYDATASTRUCT;
  560. typedef LPVOID HINTERNET;
  561. typedef VOID (CALLBACK * INTERNET_STATUS_CALLBACK)(
  562. IN HINTERNET hInternet,
  563. IN DWORD_PTR dwContext,
  564. IN DWORD dwInternetStatus,
  565. IN LPVOID lpvStatusInformation OPTIONAL,
  566. IN DWORD dwStatusInformationLength
  567. );
  568. typedef struct
  569. {
  570. DWORD dwStructSize; // size of this structure. Used in version check
  571. LPSTR lpszScheme; // pointer to scheme name
  572. DWORD dwSchemeLength; // length of scheme name
  573. INTERNET_SCHEME nScheme; // enumerated scheme type (if known)
  574. LPSTR lpszHostName; // pointer to host name
  575. DWORD dwHostNameLength; // length of host name
  576. UINT nPort; // converted port number
  577. LPSTR lpszUserName; // pointer to user name
  578. DWORD dwUserNameLength; // length of user name
  579. LPSTR lpszPassword; // pointer to password
  580. DWORD dwPasswordLength; // length of password
  581. LPSTR lpszUrlPath; // pointer to URL-path
  582. DWORD dwUrlPathLength; // length of URL-path
  583. LPSTR lpszExtraInfo; // pointer to extra information (e.g. ?foo or #foo)
  584. DWORD dwExtraInfoLength; // length of extra information
  585. } URL_COMPONENTSA, * LPURL_COMPONENTSA;
  586. struct hostent
  587. {
  588. char FAR * h_name; /* official name of host */
  589. char FAR * FAR * h_aliases; /* alias list */
  590. short h_addrtype; /* host address type */
  591. short h_length; /* length of address */
  592. char FAR * FAR * h_addr_list; /* list of addresses */
  593. #define h_addr h_addr_list[0] /* address, for backward compat */
  594. };
  595. #define WHEEL_DELTA 120
  596. #define ANSI_CHARSET 0
  597. #define SYMBOL_CHARSET 1
  598. #define NONANTIALIASED_QUALITY 0
  599. #define ANTIALIASED_QUALITY 4
  600. #define SPI_SETMOUSE 1
  601. #define SPI_GETMOUSE 2
  602. #define SC_SCREENSAVE 0
  603. #define SC_CLOSE 1
  604. #define SC_KEYMENU 2
  605. #define SC_MONITORPOWER 3
  606. #define SIZE_MINIMIZED 0
  607. #define DM_PELSWIDTH 0
  608. #define DM_PELSHEIGHT 0
  609. #define DM_BITSPERPEL 0
  610. #define DM_DISPLAYFREQUENCY 0
  611. #define CDS_FULLSCREEN 0
  612. #define FILE_TYPE_UNKNOWN 0
  613. #define FILE_TYPE_DISK 1
  614. #define HORZRES 1
  615. #define VERTRES 2
  616. #define VREFRESH 3
  617. #define FILE_MAP_ALL_ACCESS 0
  618. #define FILE_MAP_COPY 1
  619. #define FILE_MAP_WRITE 2
  620. #define FILE_MAP_READ 3
  621. #define PBT_APMQUERYSUSPEND 0
  622. #define BROADCAST_QUERY_DENY 0x424D5144
  623. #define IDOK 0
  624. #define IDCANCEL 1
  625. #define IMAGE_ICON 0
  626. #define MB_ICONEXCLAMATION 1
  627. #define MB_OKCANCEL 2
  628. #define MB_SYSTEMMODAL 3
  629. #define MB_ICONERROR 4
  630. #define LR_DEFAULTCOLOR 0x0000
  631. #define LR_MONOCHROME 0x0001
  632. #define LR_COLOR 0x0002
  633. #define LR_COPYRETURNORG 0x0004
  634. #define LR_COPYDELETEORG 0x0008
  635. #define LR_LOADFROMFILE 0x0010
  636. #define LR_LOADTRANSPARENT 0x0020
  637. #define LR_DEFAULTSIZE 0x0040
  638. #define LR_VGACOLOR 0x0080
  639. #define LR_LOADMAP3DCOLORS 0x1000
  640. #define LR_CREATEDIBSECTION 0x2000
  641. #define LR_COPYFROMRESOURCE 0x4000
  642. #define LR_SHARED 0x8000
  643. #define MAKEINTRESOURCE( res ) ((ULONG_PTR) (USHORT) res)
  644. #define CREATE_NEW_CONSOLE 0x00000010
  645. // registry
  646. #define REG_OPTION_NON_VOLATILE 0ul
  647. #define REG_CREATED_NEW_KEY 1
  648. #define HKEY_CLASSES_ROOT (HKEY)0
  649. // winsock
  650. #define MSG_NOSIGNAL 0
  651. #define MSG_PEEK 2
  652. // show styles
  653. #define SW_SHOWNORMAL 0
  654. #define SW_SHOWDEFAULT 1
  655. #define SW_SHOW 2
  656. #define SW_MINIMIZE 3
  657. #define SWP_NOZORDER 0x00000001
  658. #define SWP_NOREDRAW 0x00000002
  659. #define SWP_NOSIZE 0x00000004
  660. #define SWP_NOMOVE 0x00000008
  661. #define SWP_SHOWWINDOW 0x00000010
  662. #define SWP_DRAWFRAME 0x00000020
  663. // platform versions
  664. #define VER_PLATFORM_WIN32s 0
  665. #define VER_PLATFORM_WIN32_WINDOWS 1
  666. #define VER_PLATFORM_WIN32_NT 2
  667. // windows messages
  668. #define WM_CHAR 1
  669. #define WM_CLOSE 2
  670. #define WM_DESTROY 3
  671. #define WM_MOUSEMOVE 4
  672. #define WM_LBUTTONUP 5
  673. #define WM_LBUTTONDOWN 6
  674. #define WM_RBUTTONUP 7
  675. #define WM_RBUTTONDOWN 8
  676. #define WM_SETFOCUS 9
  677. #define WM_SETCURSOR 10
  678. #define WM_MBUTTONDOWN 11
  679. #define WM_MBUTTONUP 12
  680. #define WM_LBUTTONDBLCLK 13
  681. #define WM_RBUTTONDBLCLK 14
  682. #define WM_MBUTTONDBLCLK 15
  683. #define WM_MOUSEWHEEL 16
  684. #define WM_KEYDOWN 17
  685. #define WM_SYSKEYDOWN 18
  686. #define WM_SYSCHAR 19
  687. #define WM_KEYUP 20
  688. #define WM_SYSKEYUP 21
  689. #define WM_PAINT 23
  690. #define WM_COPYDATA 24
  691. #define WM_MOVE 25
  692. #define WM_ACTIVATEAPP 26
  693. #define WM_QUIT 27
  694. #define WM_CREATE 28
  695. #define WM_SYSCOMMAND 29
  696. #define WM_SIZE 30
  697. #define WM_SETTINGCHANGE 31
  698. #define WM_USER 32
  699. #define WM_POWERBROADCAST 33
  700. #define WM_IME_CHAR 34
  701. #define WM_IME_NOTIFY 35
  702. #define WM_IME_STARTCOMPOSITION 36
  703. #define WM_IME_COMPOSITION 37
  704. #define WM_IME_ENDCOMPOSITION 38
  705. #define WM_IME_SETCONTEXT 39
  706. #define WM_INPUTLANGCHANGE 40
  707. #define IMN_OPENCANDIDATE 0
  708. #define IMN_SETOPENSTATUS 1
  709. #define IMN_CHANGECANDIDATE 2
  710. #define IMN_CLOSECANDIDATE 3
  711. #define IMN_SETCONVERSIONMODE 4
  712. #define IMN_SETSENTENCEMODE 5
  713. #define IMN_CLOSESTATUSWINDOW 6
  714. #define IMN_GUIDELINE 7
  715. #define IMN_OPENSTATUSWINDOW 8
  716. #define IMN_SETCANDIDATEPOS 9
  717. #define IMN_SETCOMPOSITIONFONT 10
  718. #define IMN_SETCOMPOSITIONWINDOW 11
  719. #define IMN_SETSTATUSWINDOWPOS 12
  720. #define ISC_SHOWUICOMPOSITIONWINDOW 0
  721. #define ISC_SHOWUIGUIDELINE 0
  722. #define ISC_SHOWUIALLCANDIDATEWINDOW 0
  723. // message box
  724. #define MB_OK 0
  725. #define MB_ICONINFORMATION 0
  726. #define MB_TOPMOST 0
  727. #define SEM_NOGPFAULTERRORBOX 2
  728. // class styles
  729. #define CS_OWNDC 0
  730. #define CS_DBLCLKS 0
  731. #define CS_CLASSDC 0
  732. #define CS_HREDRAW 0
  733. #define CS_VREDRAW 0
  734. #define IDC_ARROW 0
  735. #define STD_INPUT_HANDLE ((DWORD)-10)
  736. #define STD_OUTPUT_HANDLE ((DWORD)-11)
  737. #define COLOR_GRAYTEXT 0
  738. #define WHITE_BRUSH 0
  739. #define SRCCOPY 0
  740. /* Font Weights */
  741. #define FW_DONTCARE 0
  742. #define FW_THIN 100
  743. #define FW_EXTRALIGHT 200
  744. #define FW_LIGHT 300
  745. #define FW_NORMAL 400
  746. #define FW_MEDIUM 500
  747. #define FW_SEMIBOLD 600
  748. #define FW_BOLD 700
  749. #define FW_EXTRABOLD 800
  750. #define FW_HEAVY 900
  751. #define CLIP_DEFAULT_PRECIS 0
  752. #define DEFAULT_PITCH 0
  753. #define TRANSPARENT 1
  754. #define OUT_TT_PRECIS 4
  755. #define BI_RGB 0L
  756. #define IMAGE_BITMAP 0
  757. #define DT_NOPREFIX 0x00000000
  758. #define DT_VCENTER 0x00000000
  759. #define DT_CENTER 0x00000000
  760. #define DT_LEFT 0x00000000
  761. #define DT_RIGHT 0x00000000
  762. #define DT_SINGLELINE 0x00000000
  763. #define DIB_RGB_COLORS 0
  764. // window styles
  765. #define WS_OVERLAPPEDWINDOW 0
  766. #define WS_POPUP 0
  767. #define WS_CLIPSIBLINGS 0
  768. #define WS_THICKFRAME 0
  769. #define WS_MAXIMIZEBOX 0
  770. #define WS_VISIBLE 0
  771. #define WS_EX_TOOLWINDOW 0
  772. #define WS_EX_TOPMOST 0
  773. #define WS_CAPTION 0
  774. #define WS_SYSMENU 0
  775. #define WS_CLIPCHILDREN 0
  776. // cursors
  777. #define OCR_NORMAL 1
  778. #define OCR_IBEAM 2
  779. #define OCR_WAIT 3
  780. #define OCR_CROSS 4
  781. #define OCR_UP 5
  782. #define OCR_SIZENWSE 6
  783. #define OCR_SIZENESW 7
  784. #define OCR_SIZEWE 8
  785. #define OCR_SIZENS 9
  786. #define OCR_SIZEALL 10
  787. #define OCR_NO 11
  788. #define OCR_HAND 12
  789. // system metrics
  790. #define SM_CXFIXEDFRAME 1
  791. #define SM_CYFIXEDFRAME 2
  792. #define SM_CYSIZE 3
  793. #define SM_CXSCREEN 4
  794. #define SM_CYSCREEN 5
  795. // window longs
  796. #define GWLP_WNDPROC (-4)
  797. #define GWLP_HINSTANCE (-6)
  798. #define GWLP_HWNDPARENT (-8)
  799. #define GWLP_USERDATA (-21)
  800. #define GWLP_ID (-12)
  801. #define GWL_WNDPROC 0
  802. #define GWL_USERDATA 1
  803. #define GWL_STYLE 2
  804. #define GWL_EXSTYLE 3
  805. #define GWL_MAX 4
  806. #define HWND_TOP ((HWND)0)
  807. #define HWND_BOTTOM ((HWND)1)
  808. #define HWND_TOPMOST ((HWND)-1)
  809. #define HWND_NOTOPMOST ((HWND)-2)
  810. #define HWND_BROADCAST 0
  811. // PeekMessage
  812. #define PM_NOREMOVE 0x0000
  813. #define PM_REMOVE 0x0001
  814. #define PM_NOYIELD 0x0002
  815. #define MK_LBUTTON 0x0001
  816. #define MK_RBUTTON 0x0002
  817. #define MK_MBUTTON 0x0004
  818. // File attributes
  819. #define FILE_ATTRIBUTE_COMPRESSED 0x00000800
  820. #define QS_INPUT 0
  821. #define QS_ALLEVENTS 5
  822. #define KEY_EVENT 0
  823. // sockets
  824. #define SO_KEEPALIVE 8
  825. // Download status cases
  826. #define INTERNET_STATUS_RESOLVING_NAME 0
  827. #define INTERNET_STATUS_NAME_RESOLVED 1
  828. #define INTERNET_STATUS_CONNECTING_TO_SERVER 2
  829. #define INTERNET_STATUS_CONNECTED_TO_SERVER 3
  830. #define INTERNET_STATUS_SENDING_REQUEST 4
  831. #define INTERNET_STATUS_REQUEST_SENT 5
  832. #define INTERNET_STATUS_REQUEST_COMPLETE 6
  833. #define INTERNET_STATUS_CLOSING_CONNECTION 7
  834. #define INTERNET_STATUS_CONNECTION_CLOSED 8
  835. #define INTERNET_STATUS_RECEIVING_RESPONSE 9
  836. #define INTERNET_STATUS_RESPONSE_RECEIVED 10
  837. #define INTERNET_STATUS_HANDLE_CLOSING 11
  838. #define INTERNET_STATUS_HANDLE_CREATED 12
  839. #define INTERNET_STATUS_INTERMEDIATE_RESPONSE 13
  840. #define INTERNET_STATUS_REDIRECT 14
  841. #define INTERNET_STATUS_STATE_CHANGE 15
  842. #define INTERNET_FLAG_RELOAD 0x80000000 // retrieve the original item
  843. #define INTERNET_FLAG_RAW_DATA 0x40000000 // FTP/gopher find: receive the item as raw (structured) data
  844. #define INTERNET_FLAG_EXISTING_CONNECT 0x20000000 // FTP: use existing InternetConnect handle for server if possible
  845. #define INTERNET_FLAG_ASYNC 0x10000000 // this request is asynchronous (where supported)
  846. #define INTERNET_FLAG_PASSIVE 0x08000000 // used for FTP connections
  847. #define INTERNET_FLAG_NO_CACHE_WRITE 0x04000000 // don't write this item to the cache
  848. #define INTERNET_FLAG_DONT_CACHE INTERNET_FLAG_NO_CACHE_WRITE
  849. #define INTERNET_FLAG_MAKE_PERSISTENT 0x02000000 // make this item persistent in cache
  850. #define INTERNET_FLAG_FROM_CACHE 0x01000000 // use offline semantics
  851. #define INTERNET_FLAG_OFFLINE INTERNET_FLAG_FROM_CACHE
  852. #define INTERNET_FLAG_SECURE 0x00800000 // use PCT/SSL if applicable (HTTP)
  853. #define INTERNET_FLAG_KEEP_CONNECTION 0x00400000 // use keep-alive semantics
  854. #define INTERNET_FLAG_NO_AUTO_REDIRECT 0x00200000 // don't handle redirections automatically
  855. #define INTERNET_FLAG_READ_PREFETCH 0x00100000 // do background read prefetch
  856. #define INTERNET_FLAG_NO_COOKIES 0x00080000 // no automatic cookie handling
  857. #define INTERNET_FLAG_NO_AUTH 0x00040000 // no automatic authentication handling
  858. #define INTERNET_FLAG_RESTRICTED_ZONE 0x00020000 // apply restricted zone policies for cookies, auth
  859. #define INTERNET_FLAG_CACHE_IF_NET_FAIL 0x00010000 // return cache file if net request fails
  860. #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP 0x00008000 // ex: https:// to http://
  861. #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS 0x00004000 // ex: http:// to https://
  862. #define INTERNET_FLAG_IGNORE_CERT_DATE_INVALID 0x00002000 // expired X509 Cert.
  863. #define INTERNET_FLAG_IGNORE_CERT_CN_INVALID 0x00001000 // bad common name in X509 Cert.
  864. #define INTERNET_OPEN_TYPE_PRECONFIG 0 // use registry configuration
  865. #define INTERNET_OPEN_TYPE_DIRECT 1 // direct to net
  866. #define INTERNET_OPEN_TYPE_PROXY 3 // via named proxy
  867. #define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY 4 // prevent using java/script/INS
  868. #define HTTP_QUERY_CONTENT_LENGTH 5
  869. #define HTTP_QUERY_LAST_MODIFIED 11
  870. #define HTTP_QUERY_STATUS_CODE 19 // special: part of status line
  871. #define HTTP_QUERY_RAW_HEADERS_CRLF 22 // special: all headers
  872. #define HTTP_QUERY_FLAG_NUMBER 0x20000000
  873. #define HTTP_STATUS_OK 200 // request completed
  874. #define HTTP_STATUS_PARTIAL_CONTENT 206 // partial GET furfilled
  875. // Virtual Keys, Standard Set
  876. #define VK_LBUTTON 0x01
  877. #define VK_RBUTTON 0x02
  878. #define VK_CANCEL 0x03
  879. #define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */
  880. #define VK_XBUTTON1 0x05 /* NOT contiguous with L & RBUTTON */
  881. #define VK_XBUTTON2 0x06 /* NOT contiguous with L & RBUTTON */
  882. #define VK_BACK 0x08
  883. #define VK_TAB 0x09
  884. #define VK_CLEAR 0x0C
  885. #define VK_RETURN 0x0D
  886. #define VK_SHIFT 0x10
  887. #define VK_CONTROL 0x11
  888. #define VK_MENU 0x12
  889. #define VK_PAUSE 0x13
  890. #define VK_CAPITAL 0x14
  891. #define VK_KANA 0x15
  892. #define VK_HANGEUL 0x15 /* old name - should be here for compatibility */
  893. #define VK_HANGUL 0x15
  894. #define VK_JUNJA 0x17
  895. #define VK_FINAL 0x18
  896. #define VK_HANJA 0x19
  897. #define VK_KANJI 0x19
  898. #define VK_ESCAPE 0x1B
  899. #define VK_CONVERT 0x1C
  900. #define VK_NONCONVERT 0x1D
  901. #define VK_ACCEPT 0x1E
  902. #define VK_MODECHANGE 0x1F
  903. #define VK_SPACE 0x20
  904. #define VK_PRIOR 0x21
  905. #define VK_NEXT 0x22
  906. #define VK_END 0x23
  907. #define VK_HOME 0x24
  908. #define VK_LEFT 0x25
  909. #define VK_UP 0x26
  910. #define VK_RIGHT 0x27
  911. #define VK_DOWN 0x28
  912. #define VK_SELECT 0x29
  913. #define VK_PRINT 0x2A
  914. #define VK_EXECUTE 0x2B
  915. #define VK_SNAPSHOT 0x2C
  916. #define VK_INSERT 0x2D
  917. #define VK_DELETE 0x2E
  918. #define VK_HELP 0x2F
  919. #define VK_LWIN 0x5B
  920. #define VK_RWIN 0x5C
  921. #define VK_APPS 0x5D
  922. #define VK_SLEEP 0x5F
  923. #define VK_NUMPAD0 0x60
  924. #define VK_NUMPAD1 0x61
  925. #define VK_NUMPAD2 0x62
  926. #define VK_NUMPAD3 0x63
  927. #define VK_NUMPAD4 0x64
  928. #define VK_NUMPAD5 0x65
  929. #define VK_NUMPAD6 0x66
  930. #define VK_NUMPAD7 0x67
  931. #define VK_NUMPAD8 0x68
  932. #define VK_NUMPAD9 0x69
  933. #define VK_MULTIPLY 0x6A
  934. #define VK_ADD 0x6B
  935. #define VK_SEPARATOR 0x6C
  936. #define VK_SUBTRACT 0x6D
  937. #define VK_DECIMAL 0x6E
  938. #define VK_DIVIDE 0x6F
  939. #define VK_F1 0x70
  940. #define VK_F2 0x71
  941. #define VK_F3 0x72
  942. #define VK_F4 0x73
  943. #define VK_F5 0x74
  944. #define VK_F6 0x75
  945. #define VK_F7 0x76
  946. #define VK_F8 0x77
  947. #define VK_F9 0x78
  948. #define VK_F10 0x79
  949. #define VK_F11 0x7A
  950. #define VK_F12 0x7B
  951. #define VK_F13 0x7C
  952. #define VK_F14 0x7D
  953. #define VK_F15 0x7E
  954. #define VK_F16 0x7F
  955. #define VK_F17 0x80
  956. #define VK_F18 0x81
  957. #define VK_F19 0x82
  958. #define VK_F20 0x83
  959. #define VK_F21 0x84
  960. #define VK_F22 0x85
  961. #define VK_F23 0x86
  962. #define VK_F24 0x87
  963. #define VK_NUMLOCK 0x90
  964. #define VK_SCROLL 0x91
  965. #define VK_OEM_NEC_EQUAL 0x92 // '=' key on numpad
  966. #define VK_OEM_FJ_JISHO 0x92 // 'Dictionary' key
  967. #define VK_OEM_FJ_MASSHOU 0x93 // 'Unregister word' key
  968. #define VK_OEM_FJ_TOUROKU 0x94 // 'Register word' key
  969. #define VK_OEM_FJ_LOYA 0x95 // 'Left OYAYUBI' key
  970. #define VK_OEM_FJ_ROYA 0x96 // 'Right OYAYUBI' key
  971. #define VK_LSHIFT 0xA0
  972. #define VK_RSHIFT 0xA1
  973. #define VK_LCONTROL 0xA2
  974. #define VK_RCONTROL 0xA3
  975. #define VK_LMENU 0xA4
  976. #define VK_RMENU 0xA5
  977. #define VK_BROWSER_BACK 0xA6
  978. #define VK_BROWSER_FORWARD 0xA7
  979. #define VK_BROWSER_REFRESH 0xA8
  980. #define VK_BROWSER_STOP 0xA9
  981. #define VK_BROWSER_SEARCH 0xAA
  982. #define VK_BROWSER_FAVORITES 0xAB
  983. #define VK_BROWSER_HOME 0xAC
  984. #define VK_VOLUME_MUTE 0xAD
  985. #define VK_VOLUME_DOWN 0xAE
  986. #define VK_VOLUME_UP 0xAF
  987. #define VK_MEDIA_NEXT_TRACK 0xB0
  988. #define VK_MEDIA_PREV_TRACK 0xB1
  989. #define VK_MEDIA_STOP 0xB2
  990. #define VK_MEDIA_PLAY_PAUSE 0xB3
  991. #define VK_LAUNCH_MAIL 0xB4
  992. #define VK_LAUNCH_MEDIA_SELECT 0xB5
  993. #define VK_LAUNCH_APP1 0xB6
  994. #define VK_LAUNCH_APP2 0xB7
  995. #define VK_OEM_1 0xBA // ';:' for US
  996. #define VK_OEM_PLUS 0xBB // '+' any country
  997. #define VK_OEM_COMMA 0xBC // ',' any country
  998. #define VK_OEM_MINUS 0xBD // '-' any country
  999. #define VK_OEM_PERIOD 0xBE // '.' any country
  1000. #define VK_OEM_2 0xBF // '/?' for US
  1001. #define VK_OEM_3 0xC0 // '`~' for US
  1002. #define VK_OEM_4 0xDB // '[{' for US
  1003. #define VK_OEM_5 0xDC // '\|' for US
  1004. #define VK_OEM_6 0xDD // ']}' for US
  1005. #define VK_OEM_7 0xDE // ''"' for US
  1006. #define VK_OEM_8 0xDF
  1007. #define VK_OEM_AX 0xE1 // 'AX' key on Japanese AX kbd
  1008. #define VK_OEM_102 0xE2 // "<>" or "\|" on RT 102-key kbd.
  1009. #define VK_ICO_HELP 0xE3 // Help key on ICO
  1010. #define VK_ICO_00 0xE4 // 00 key on ICO
  1011. #define VK_PROCESSKEY 0xE5
  1012. #define VK_ICO_CLEAR 0xE6
  1013. #define VK_PACKET 0xE7
  1014. #define VK_OEM_RESET 0xE9
  1015. #define VK_OEM_JUMP 0xEA
  1016. #define VK_OEM_PA1 0xEB
  1017. #define VK_OEM_PA2 0xEC
  1018. #define VK_OEM_PA3 0xED
  1019. #define VK_OEM_WSCTRL 0xEE
  1020. #define VK_OEM_CUSEL 0xEF
  1021. #define VK_OEM_ATTN 0xF0
  1022. #define VK_OEM_FINISH 0xF1
  1023. #define VK_OEM_COPY 0xF2
  1024. #define VK_OEM_AUTO 0xF3
  1025. #define VK_OEM_ENLW 0xF4
  1026. #define VK_OEM_BACKTAB 0xF5
  1027. #define VK_ATTN 0xF6
  1028. #define VK_CRSEL 0xF7
  1029. #define VK_EXSEL 0xF8
  1030. #define VK_EREOF 0xF9
  1031. #define VK_PLAY 0xFA
  1032. #define VK_ZOOM 0xFB
  1033. #define VK_NONAME 0xFC
  1034. #define VK_PA1 0xFD
  1035. #define VK_OEM_CLEAR 0xFE
  1036. #ifdef getenv
  1037. #undef getenv
  1038. #endif
  1039. #ifdef _getenv
  1040. #undef _getenv
  1041. #endif
  1042. #define getenv XBX_getenv
  1043. #define _getenv XBX_getenv
  1044. FORCEINLINE char *XBX_getenv(const char *name) { return NULL; }
  1045. #ifdef _putenv
  1046. #undef _putenv
  1047. #endif
  1048. #define _putenv XBX_putenv
  1049. FORCEINLINE int XBX_putenv(const char *name) { return -1; }
  1050. #ifdef GetEnvironmentVariable
  1051. #undef GetEnvironmentVariable
  1052. #endif
  1053. #define GetEnvironmentVariable XBX_GetEnvironmentVariable
  1054. FORCEINLINE DWORD XBX_GetEnvironmentVariable( LPCTSTR lpName, LPTSTR lpBuffer, DWORD nSize ) { return 0; }
  1055. #ifdef unlink
  1056. #undef unlink
  1057. #endif
  1058. #define unlink XBX_unlink
  1059. PLATFORM_INTERFACE int XBX_unlink( const char* filename );
  1060. #ifdef mkdir
  1061. #undef mkdir
  1062. #endif
  1063. #ifdef _mkdir
  1064. #undef _mkdir
  1065. #endif
  1066. #define mkdir XBX_mkdir
  1067. #define _mkdir XBX_mkdir
  1068. PLATFORM_INTERFACE int XBX_mkdir( const char *pszDir );
  1069. #ifdef getcwd
  1070. #undef getcwd
  1071. #endif
  1072. #ifdef _getcwd
  1073. #undef _getcwd
  1074. #endif
  1075. #define getcwd XBX_getcwd
  1076. #define _getcwd XBX_getcwd
  1077. PLATFORM_INTERFACE char *XBX_getcwd( char *buf, size_t size );
  1078. #ifdef GetCurrentDirectory
  1079. #undef GetCurrentDirectory
  1080. #endif
  1081. #define GetCurrentDirectory XBX_GetCurrentDirectory
  1082. PLATFORM_INTERFACE DWORD XBX_GetCurrentDirectory( DWORD nBufferLength, LPTSTR lpBuffer );
  1083. #ifdef _access
  1084. #undef _access
  1085. #endif
  1086. #define _access XBX_access
  1087. PLATFORM_INTERFACE int XBX_access( const char *path, int mode );
  1088. #ifdef _chdir
  1089. #undef _chdir
  1090. #endif
  1091. #define _chdir XBX_chdir
  1092. FORCEINLINE int XBX_chdir( const char *dirname ) { return -1; }
  1093. FORCEINLINE BOOL SetPriorityClass( HANDLE hProcess, DWORD dwPriorityClass ) { return FALSE; }
  1094. PLATFORM_INTERFACE int MessageBox( HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType );
  1095. #ifdef GetModuleFileName
  1096. #undef GetModuleFileName
  1097. #endif
  1098. #define GetModuleFileName XBX_GetModuleFileName
  1099. PLATFORM_INTERFACE DWORD XBX_GetModuleFileName( HMODULE hModule, LPTSTR lpFilename, DWORD nSize );
  1100. //FORCEINLINE int WSAStartup( WORD wVersionRequested, LPWSADATA lpWSAData ) { return WSASYSNOTREADY; }
  1101. //FORCEINLINE int WSACleanup(void) { return WSANOTINITIALISED; }
  1102. FORCEINLINE HRESULT CoInitialize( LPVOID pvReserved ) { return S_OK; }
  1103. FORCEINLINE void CoUninitialize( void ) { }
  1104. FORCEINLINE LRESULT DefWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { return 0L; }
  1105. FORCEINLINE void PostQuitMessage(int nExitCode) { }
  1106. FORCEINLINE HANDLE GetStdHandle( DWORD ) { return 0; }
  1107. FORCEINLINE BOOL GetConsoleScreenBufferInfo( HANDLE, PCONSOLE_SCREEN_BUFFER_INFO ) { return false; }
  1108. FORCEINLINE COORD GetLargestConsoleWindowSize( HANDLE ) { COORD c = { 0, 0 }; return c; }
  1109. FORCEINLINE BOOL SetConsoleWindowInfo( HANDLE, BOOL, SMALL_RECT* ) { return false; }
  1110. FORCEINLINE BOOL SetConsoleScreenBufferSize( HANDLE, COORD ) { return false; }
  1111. FORCEINLINE BOOL ReadConsoleOutputCharacter( HANDLE, LPTSTR, DWORD, COORD, LPDWORD ) { return false; }
  1112. FORCEINLINE BOOL WriteConsoleInput( HANDLE, CONST INPUT_RECORD*, DWORD, LPDWORD ) { return false; }
  1113. FORCEINLINE HWND GetDesktopWindow(VOID) { return (HWND)0; }
  1114. FORCEINLINE int GetWindowText( HWND, LPTSTR, int ) { return 0; }
  1115. FORCEINLINE UINT RegisterWindowMessage(LPCTSTR lpString) { return 0xC000; }
  1116. FORCEINLINE HWND FindWindow(LPCTSTR lpClassName, LPCTSTR lpWindowName) { return NULL; }
  1117. FORCEINLINE BOOL EnumWindows(WNDENUMPROC lpEnumFunc, LPARAM lParam) { return FALSE; }
  1118. FORCEINLINE BOOL PostMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { return FALSE; }
  1119. FORCEINLINE BOOL SystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni) { return FALSE; }
  1120. FORCEINLINE BOOL SetForegroundWindow(HWND hWnd) { return TRUE; }
  1121. FORCEINLINE HDC BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint) { return NULL; }
  1122. FORCEINLINE BOOL EndPaint(HWND hWnd, CONST PAINTSTRUCT *lpPaint) { return TRUE; }
  1123. FORCEINLINE BOOL AdjustWindowRectEx(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle) { return TRUE; }
  1124. FORCEINLINE LONG ChangeDisplaySettings(LPDEVMODE lpDevMode, DWORD dwflags) { return DISP_CHANGE_SUCCESSFUL; }
  1125. FORCEINLINE DWORD GetFileType(HANDLE hFile) { return FILE_TYPE_DISK; }
  1126. FORCEINLINE BOOL FileTimeToDosDateTime(const FILETIME* lpFileTime, LPWORD lpFatDate, LPWORD lpFatTime)
  1127. {
  1128. *lpFatDate = 0;
  1129. *lpFatTime = 0;
  1130. return TRUE;
  1131. }
  1132. FORCEINLINE BOOL DosDateTimeToFileTime(const WORD wFatDate, const WORD wFatTime, LPFILETIME lpFileTime )
  1133. {
  1134. lpFileTime->dwHighDateTime = 0;
  1135. lpFileTime->dwLowDateTime = 0;
  1136. return TRUE;
  1137. }
  1138. FORCEINLINE BOOL SetViewportOrgEx( HDC, int, int, LPPOINT ) { return false; }
  1139. FORCEINLINE BOOL MoveWindow( HWND, int, int, int, int, BOOL ) { return false; }
  1140. FORCEINLINE int ShowCursor( BOOL ) { return 0; }
  1141. FORCEINLINE HFONT CreateFontA( int, int, int, int, int, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPCSTR) { return 0; }
  1142. FORCEINLINE int DrawText( HDC, LPCTSTR, int, LPRECT, UINT ) { return 0; }
  1143. FORCEINLINE int SetBkMode( HDC, int ) { return 0; }
  1144. FORCEINLINE COLORREF SetTextColor( HDC, COLORREF col ) { return col; }
  1145. FORCEINLINE HBRUSH CreateSolidBrush( COLORREF ) { return 0; }
  1146. FORCEINLINE BOOL Rectangle( HDC, int, int, int, int ) { return false; }
  1147. FORCEINLINE HANDLE LoadImage( HINSTANCE, LPCSTR, UINT, int, int, UINT) { return 0; }
  1148. FORCEINLINE HANDLE LoadImageA( HINSTANCE, LPCSTR, UINT, int, int, UINT) { return 0; }
  1149. FORCEINLINE HICON LoadIcon( HINSTANCE hInstance, ULONG_PTR lpIconName) { return 0; }
  1150. FORCEINLINE COLORREF SetPixel( HDC, int, int, COLORREF col ) { return col; }
  1151. FORCEINLINE BOOL BitBlt( HDC, int, int, int, int, HDC, int, int, DWORD ) { return false; }
  1152. FORCEINLINE HGDIOBJ GetStockObject( int ) { return 0; }
  1153. FORCEINLINE int GetObject( HGDIOBJ, int, LPVOID ) { return 0; }
  1154. FORCEINLINE int GetDIBits( HDC, HBITMAP, UINT, UINT, LPVOID, LPBITMAPINFO, UINT ) { return 0; }
  1155. FORCEINLINE HDC GetDC(HWND hWnd) { return (HDC)0x12345678; }
  1156. FORCEINLINE void ReleaseDC(HWND hWnd, HDC hDC) { }
  1157. FORCEINLINE HDC CreateCompatibleDC( HDC ) { return 0; }
  1158. FORCEINLINE HBITMAP CreateCompatibleBitmap( HDC, int, int ) { return 0; }
  1159. FORCEINLINE HBITMAP CreateDIBSection( HDC, CONST BITMAPINFO *, UINT, VOID **ppBits, HANDLE, DWORD) { ppBits = NULL; return 0; }
  1160. FORCEINLINE BOOL InvalidateRect( HWND, const RECT*, bool ) { return false; }
  1161. FORCEINLINE UINT joyGetDevCaps( UINT uJoyID, JOYCAPS* pjc, UINT cbjc) { return 0; }
  1162. FORCEINLINE UINT joyGetPosEx( UINT uJoyID, LPJOYINFOEX pji) { return 0; }
  1163. FORCEINLINE UINT joyGetNumDevs(void) { return 0; }
  1164. FORCEINLINE HKL GetKeyboardLayout( DWORD ) { return NULL; }
  1165. FORCEINLINE HKL LoadKeyboardLayout( LPCTSTR, UINT ) { return NULL; }
  1166. FORCEINLINE UINT MapVirtualKeyEx( UINT, UINT, HKL ) { return 0; }
  1167. FORCEINLINE SHORT GetKeyState( int nVirtKey ) { return 0; }
  1168. FORCEINLINE BOOL PeekMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg) { return FALSE; }
  1169. FORCEINLINE BOOL TranslateMessage(CONST MSG *lpMsg) { return FALSE; }
  1170. FORCEINLINE BOOL DispatchMessage(CONST MSG *lpMsg) { return FALSE; }
  1171. FORCEINLINE BOOL UpdateWindow(HWND hWnd) { return FALSE; }
  1172. FORCEINLINE LONG RegOpenKeyEx( HKEY hKey, LPCTSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult ) { return -1; }
  1173. FORCEINLINE LONG RegQueryValueEx( HKEY hKey, LPCTSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData ) { return -1; }
  1174. FORCEINLINE LONG RegCreateKeyEx( HKEY hKey, LPCTSTR lpSubKey, DWORD Reserved, LPTSTR lpClass, DWORD dwOptions, REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition ) { return -1; }
  1175. FORCEINLINE LONG RegSetValueEx( HKEY hKey, LPCTSTR lpValueName, DWORD Reserved, DWORD dwType, const BYTE* lpData, DWORD cbData ) { return -1; }
  1176. FORCEINLINE LONG RegDeleteValue( HKEY hKey, LPCTSTR lpValueName ) { return -1; }
  1177. FORCEINLINE LONG RegCloseKey( HKEY hKey ) { return -1; }
  1178. FORCEINLINE BOOL ClientToScreen( HWND hwnd, LPPOINT lpPoint )
  1179. {
  1180. lpPoint->x = 0;
  1181. lpPoint->y = 0;
  1182. return TRUE;
  1183. }
  1184. FORCEINLINE BOOL SetCursorPos( int x, int y ) { return FALSE; }
  1185. FORCEINLINE BOOL UnregisterClass( LPCTSTR lpClassNAme, HINSTANCE hInstance ) { return TRUE; }
  1186. FORCEINLINE BOOL UnregisterClassW( LPCWSTR lpClassNAme, HINSTANCE hInstance ) { return TRUE; }
  1187. FORCEINLINE HCURSOR LoadCursor( HINSTANCE, LPCTSTR lpCursorName ) { return NULL; }
  1188. FORCEINLINE HWND GetParent( HWND hWnd ) { return NULL; }
  1189. FORCEINLINE BOOL EnumChildWindows( HWND hWndParent, WNDENUMPROC lpEnumFunc, LPARAM lParam ) { return FALSE; }
  1190. FORCEINLINE BOOL IsIconic( HWND hWnd ) { return FALSE; }
  1191. FORCEINLINE BOOL DestroyCursor( HCURSOR hCursor ) { return TRUE; }
  1192. FORCEINLINE HCURSOR LoadCursorFromFile( LPCTSTR lpFileName ) { return NULL; }
  1193. FORCEINLINE HCURSOR SetCursor( HCURSOR hCursor ) { return NULL; }
  1194. FORCEINLINE BOOL GetCursorPos( LPPOINT lpPoint ) { return TRUE; }
  1195. FORCEINLINE BOOL ScreenToClient( HWND hWnd, LPPOINT lpPoint ) { return TRUE; }
  1196. FORCEINLINE HWND SetCapture( HWND hWnd ) { return NULL; }
  1197. FORCEINLINE BOOL ReleaseCapture() { return TRUE; }
  1198. FORCEINLINE BOOL DeleteObject( HGDIOBJ hObject ) { return TRUE; }
  1199. FORCEINLINE BOOL DeleteDC( HDC hdc ) { return TRUE; }
  1200. FORCEINLINE HGDIOBJ SelectObject( HDC hdc, HGDIOBJ hgdiobj ) { return NULL; }
  1201. FORCEINLINE BOOL GetComputerName( LPTSTR lpBuffer, LPDWORD nSize ) { return FALSE; }
  1202. FORCEINLINE BOOL GetUserName( LPTSTR lpBuffer, LPDWORD nSize ) { return FALSE; }
  1203. FORCEINLINE UINT SetErrorMode( UINT mode ) { return 0; }
  1204. FORCEINLINE MCIERROR mciGetDeviceID( LPCTSTR ) { return 0; }
  1205. FORCEINLINE MCIERROR mciSendString( LPCTSTR lpszCommand, LPTSTR lpszReturnString, UINT cchReturn, HANDLE hwndCallback ) { return 0; }
  1206. FORCEINLINE MCIERROR mciSendCommand( MCIDEVICEID, UINT, DWORD, DWORD ) { return (UINT)MCIERR_DRIVER; }
  1207. FORCEINLINE BOOL mciGetErrorString( MCIERROR, LPTSTR, UINT ) { return false; };
  1208. FORCEINLINE int UuidCreate( UUID *newId ) { return 0; };
  1209. FORCEINLINE HANDLE CreateFileMapping( HANDLE, LPSECURITY_ATTRIBUTES, DWORD, DWORD, DWORD, LPCTSTR ) { return NULL; }
  1210. FORCEINLINE LPVOID MapViewOfFile( HANDLE, DWORD, DWORD, DWORD, SIZE_T ) { return NULL; }
  1211. FORCEINLINE BOOL UnmapViewOfFile( LPCVOID ) { return false; }
  1212. FORCEINLINE BOOL GetVersionEx( LPOSVERSIONINFO lpVersionInfo ) { lpVersionInfo->dwPlatformId = VER_PLATFORM_WIN32_NT; return true; }
  1213. FORCEINLINE BOOL GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpBuffer ) { return false; }
  1214. FORCEINLINE BOOL TerminateThread( HANDLE hThread, DWORD dwExitCode ) { return false; }
  1215. FORCEINLINE BOOL HttpQueryInfo( HINTERNET hRequest, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex ) { return false; }
  1216. FORCEINLINE struct hostent FAR * _stdcall FAR gethostbyname( const char FAR * name ) { return NULL; }
  1217. FORCEINLINE BOOL InternetReadFile(HINTERNET hFile, LPVOID lpBuffer, DWORD dwNumberOfBytesToRead, LPDWORD lpdwNumberOfBytesRead ) { return false; }
  1218. FORCEINLINE BOOL InternetCloseHandle( HINTERNET hInternet ) { return false; }
  1219. FORCEINLINE BOOL InternetCrackUrl( LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, LPURL_COMPONENTS lpUrlComponents ) { return false; }
  1220. FORCEINLINE HINTERNET InternetOpen( LPCSTR lpszAgent, DWORD dwAccessType, LPCSTR lpszProxy OPTIONAL, LPCSTR lpszProxyBypass OPTIONAL, DWORD dwFlags ) { return 0; }
  1221. FORCEINLINE INTERNET_STATUS_CALLBACK InternetSetStatusCallback( HINTERNET hInternet, INTERNET_STATUS_CALLBACK lpfnInternetCallback ) { return NULL; }
  1222. FORCEINLINE HINTERNET InternetOpenUrl( HINTERNET hInternet, LPCSTR lpszUrl,LPCSTR lpszHeaders OPTIONAL, DWORD dwHeadersLength, DWORD dwFlags, DWORD_PTR dwContext ) { return 0; }
  1223. FORCEINLINE BOOL TerminateProcess( HANDLE, UINT ) { return false; }
  1224. FORCEINLINE DWORD MsgWaitForMultipleObjects( DWORD, CONST HANDLE*, BOOL, DWORD, DWORD ) { return 0; }
  1225. FORCEINLINE int gethostname( char *dest, int len )
  1226. {
  1227. #if defined( Q_strncpy )
  1228. Q_strncpy( dest, "localhost", len );
  1229. #else
  1230. strncpy( dest, "localhost", len );
  1231. #endif
  1232. return 0;
  1233. }
  1234. FORCEINLINE BOOL GetProcessTimes( HANDLE, LPFILETIME ft1, LPFILETIME ft2, LPFILETIME ft3, LPFILETIME ft4 ) { return false; }
  1235. //FORCEINLINE time_t Time(time_t *today) { ULARGE_INTEGER ul; GetSystemTimeAsFileTime( (FILETIME*)&ul ); if(today) *today=ul.QuadPart; return ul.QuadPart; }
  1236. FORCEINLINE long Time(long *today) { ULARGE_INTEGER ul; GetSystemTimeAsFileTime( (FILETIME*)&ul ); if(today) *today=ul.QuadPart; return ul.QuadPart; }
  1237. FORCEINLINE BOOL CreateProcess( LPCSTR lpApplicationName,
  1238. LPSTR lpCommandLine,
  1239. LPSECURITY_ATTRIBUTES lpProcessAttributes,
  1240. LPSECURITY_ATTRIBUTES lpThreadAttributes,
  1241. BOOL bInheritHandles, DWORD dwCreationFlags,
  1242. LPVOID lpEnvironment, LPCSTR lpCurrentDirectory,
  1243. LPSTARTUPINFO lpStartupInfo,
  1244. LPPROCESS_INFORMATION lpProcessInformation )
  1245. {
  1246. return false;
  1247. }
  1248. PLATFORM_INTERFACE DWORD g_dwProcessAffinityMask;
  1249. FORCEINLINE bool GetProcessAffinityMask( HANDLE hProcess, DWORD *lpProcessAffinityMask, DWORD *lpSystemAffinityMask )
  1250. {
  1251. *lpProcessAffinityMask = g_dwProcessAffinityMask;
  1252. *lpSystemAffinityMask = 0x01;
  1253. return true;
  1254. }
  1255. FORCEINLINE bool SetProcessAffinityMask( HANDLE hProcess, DWORD dwProcessAffinityMask )
  1256. {
  1257. if ( dwProcessAffinityMask == 0 )
  1258. {
  1259. // invalid
  1260. return false;
  1261. }
  1262. g_dwProcessAffinityMask = dwProcessAffinityMask;
  1263. return true;
  1264. }
  1265. FORCEINLINE DWORD_PTR SetThreadAffinityMask( HANDLE hThread, DWORD_PTR dwThreadAffinityMask )
  1266. {
  1267. if ( dwThreadAffinityMask == 0 )
  1268. {
  1269. // invalid
  1270. return 0;
  1271. }
  1272. // must select a specific processor, even if affinity mask specifies multiple.
  1273. // bit mask to enum will choose last valid processor
  1274. DWORD dwProcessor = 0;
  1275. while ( dwThreadAffinityMask >>= 1 )
  1276. dwProcessor++;
  1277. dwProcessor = XSetThreadProcessor( hThread, dwProcessor );
  1278. if ( dwProcessor == (DWORD)-1 )
  1279. {
  1280. // failed
  1281. return 0;
  1282. }
  1283. // back to bit mask
  1284. return ( 1<<dwProcessor );
  1285. }
  1286. // snd_win.cpp
  1287. class IAudioDevice;
  1288. class CAudioSource;
  1289. FORCEINLINE IAudioDevice *Audio_CreateWaveDevice( void ) { return NULL; }
  1290. FORCEINLINE IAudioDevice *Audio_CreateDirectSoundDevice( void ) { return NULL; }
  1291. FORCEINLINE CAudioSource* Voice_SetupAudioSource( int soundsource, int entchannel ) { return NULL; }
  1292. // snd_wave_source.cpp
  1293. FORCEINLINE float GetMP3Duration_Helper( char const *filename ) { return 0.f; }
  1294. // host.cpp
  1295. FORCEINLINE void InitPME() {}
  1296. FORCEINLINE void ShutdownPME() {}
  1297. // Steam API stubs
  1298. class ISteamClient;
  1299. class ISteamGameServer;
  1300. class ISteamUtils;
  1301. class ISteamUser;
  1302. class ISteamUserStats;
  1303. class ISteamFriends;
  1304. class ISteamMasterServerUpdater;
  1305. enum EServerMode;
  1306. FORCEINLINE ISteamClient *SteamClient() { return NULL; }
  1307. FORCEINLINE ISteamGameServer *SteamGameServer() { return NULL; }
  1308. FORCEINLINE ISteamUtils *SteamGameServerUtils() { return NULL; }
  1309. FORCEINLINE ISteamUtils *SteamUtils() { return NULL; }
  1310. FORCEINLINE ISteamUser *SteamUser() { return NULL; }
  1311. FORCEINLINE ISteamUserStats *SteamUserStats() { return NULL; }
  1312. FORCEINLINE ISteamFriends *SteamFriends() { return NULL; }
  1313. FORCEINLINE int32 GetHSteamPipe() { return 0; }
  1314. FORCEINLINE int32 GetHSteamUser() { return 0; }
  1315. FORCEINLINE ISteamMasterServerUpdater *SteamMasterServerUpdater() { return NULL; }
  1316. FORCEINLINE bool SteamGameServer_Init( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usSpectatorPort, uint16 usQueryPort, EServerMode eServerMode, int nGameAppId, const char *pchGameDir, const char *pchVersionString ) { return false; }
  1317. FORCEINLINE void SteamGameServer_Shutdown() {}
  1318. FORCEINLINE void SteamGameServer_RunCallbacks() {}
  1319. FORCEINLINE int getch( void ) { return 0; }
  1320. PLATFORM_INTERFACE LONG GetWindowLong( HWND hWnd, int nIndex );
  1321. PLATFORM_INTERFACE LONG SetWindowLong( HWND hWnd, int nIndex, LONG dwNewLong );
  1322. PLATFORM_INTERFACE LONG_PTR GetWindowLongPtr( HWND hWnd, int nIndex );
  1323. PLATFORM_INTERFACE LONG_PTR SetWindowLongPtr( HWND hWnd, int nIndex, LONG dwNewLong );
  1324. PLATFORM_INTERFACE LONG_PTR GetWindowLongPtrW( HWND hWnd, int nIndex ); // false stub -- no work has been done to make unicode version of this function on 360
  1325. PLATFORM_INTERFACE LONG_PTR SetWindowLongPtrW( HWND hWnd, int nIndex, LONG dwNewLong ); // false stub -- no work has been done to make unicode version of this function on 360
  1326. PLATFORM_INTERFACE HWND CreateWindow( LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam );
  1327. PLATFORM_INTERFACE HWND CreateWindowEx( DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam );
  1328. PLATFORM_INTERFACE BOOL DestroyWindow( HWND hWnd );
  1329. PLATFORM_INTERFACE ATOM RegisterClassEx( CONST WNDCLASSEX *lpwcx );
  1330. PLATFORM_INTERFACE ATOM RegisterClass( CONST WNDCLASS *lpwc );
  1331. PLATFORM_INTERFACE HWND GetFocus( VOID );
  1332. PLATFORM_INTERFACE HWND SetFocus( HWND hWnd );
  1333. PLATFORM_INTERFACE int GetSystemMetrics( int nIndex );
  1334. PLATFORM_INTERFACE BOOL ShowWindow( HWND hWnd, int nCmdShow );
  1335. PLATFORM_INTERFACE LRESULT SendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
  1336. PLATFORM_INTERFACE LRESULT CallWindowProc( WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
  1337. PLATFORM_INTERFACE LRESULT CallWindowProcW( WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
  1338. PLATFORM_INTERFACE BOOL GetClientRect( HWND hwnd, LPRECT lpRect );
  1339. PLATFORM_INTERFACE int GetDeviceCaps( HDC hdc, int nIndex );
  1340. PLATFORM_INTERFACE LRESULT SendMessageTimeout( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, UINT fuFlags, UINT uTimeout, PDWORD_PTR lpdwResult );
  1341. PLATFORM_INTERFACE BOOL SetWindowPos( HWND hWnd, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags );