Team Fortress 2 Source Code as on 22/4/2020
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.

1593 lines
47 KiB

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