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.

1600 lines
46 KiB

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