Source code of Windows XP (NT5)
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.

654 lines
15 KiB

  1. /******************************************************************************
  2. *
  3. * Copyright (C) 2001-2002 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dpnbuild.h
  6. *
  7. * Content: DirectPlay build specific defines header.
  8. *
  9. * History:
  10. * Date By Reason
  11. * ======== ======== =========
  12. * 11/08/01 VanceO Created to reduce the build nightmare.
  13. *
  14. ******************************************************************************/
  15. //=============================================================================
  16. // Global defines for all build types
  17. //=============================================================================
  18. //
  19. // Use our own private class factory implementation.
  20. //
  21. #define DPNBUILD_NOCLASSFACTORY
  22. #ifdef WINCE
  23. //========================================================================
  24. // Windows CE specific defines
  25. //========================================================================
  26. #ifdef WINNT
  27. #error("WINCE and WINNT cannot both be defined!")
  28. #endif // WINNT
  29. #ifdef WIN95
  30. #error("WINCE and WIN95 cannot both be defined!")
  31. #endif // WIN95
  32. #ifdef _XBOX
  33. #error("WINCE and _XBOX cannot both be defined!")
  34. #endif // _XBOX
  35. //
  36. // Windows CE builds Unicode.
  37. //
  38. #ifndef UNICODE
  39. #define UNICODE
  40. #endif // ! UNICODE
  41. #ifndef _UNICODE
  42. #define _UNICODE
  43. #endif // ! _UNICODE
  44. //
  45. // Eliminate unavailable components and non-CE features
  46. //
  47. #define DPNBUILD_NOCOMEMULATION
  48. #define DPNBUILD_NOCOMREGISTER
  49. #define DPNBUILD_NOHNETFWAPI
  50. #define DPNBUILD_NOIMAGEHLP
  51. #define DPNBUILD_NOIPV6
  52. #define DPNBUILD_NOIPX
  53. #define DPNBUILD_NOLEGACYDP
  54. #define DPNBUILD_NOLOCALNAT
  55. #define DPNBUILD_NOMISSEDTIMERSHINT
  56. #define DPNBUILD_NOMULTICAST
  57. #define DPNBUILD_NOSERIALSP
  58. #define DPNBUILD_NOSPUI
  59. #define DPNBUILD_NOVOICE
  60. #define DPNBUILD_NOWINMM
  61. #define DPNBUILD_NOWINSOCK2
  62. #define DPNBUILD_ONLYONENATHELP
  63. #define DPNBUILD_ONLYONEPROCESSOR
  64. #ifdef DBG
  65. //===================================================================
  66. // Debug CE build specific defines
  67. //===================================================================
  68. #else // ! DBG
  69. //===================================================================
  70. // Retail CE build specific defines
  71. //===================================================================
  72. //
  73. // Don't include parameter validation or the Protocol test interface.
  74. //
  75. #define DPNBUILD_NOPARAMVAL
  76. #define DPNBUILD_NOPROTOCOLTESTITF
  77. #endif // ! DBG
  78. #else // ! WINCE
  79. #ifdef _XBOX
  80. //===================================================================
  81. // Xbox specific defines
  82. //===================================================================
  83. #ifdef WINNT
  84. #error("_XBOX and WINNT cannot both be defined!")
  85. #endif // WINNT
  86. #ifdef WIN95
  87. #error("_XBOX and WIN95 cannot both be defined!")
  88. #endif // WIN95
  89. //
  90. // Eliminate unavailable components and non-Xbox features
  91. //
  92. #define DPNBUILD_FIXEDMEMORYMODEL
  93. #define DPNBUILD_LIBINTERFACE
  94. #define DPNBUILD_NOCOMEMULATION
  95. #define DPNBUILD_NOCOMREGISTER
  96. #define DPNBUILD_NOHNETFWAPI
  97. #define DPNBUILD_NOIMAGEHLP
  98. #define DPNBUILD_NOIPV6
  99. #define DPNBUILD_NOIPX
  100. #define DPNBUILD_NOLEGACYDP
  101. #define DPNBUILD_NOLOBBY
  102. #define DPNBUILD_NOLOCALNAT
  103. #define DPNBUILD_NOMULTICAST
  104. #define DPNBUILD_NONATHELP
  105. #define DPNBUILD_NOREGISTRY
  106. #define DPNBUILD_NOSERIALSP
  107. #define DPNBUILD_NOSPUI
  108. #define DPNBUILD_NOVOICE
  109. #define DPNBUILD_NOWINMM
  110. #define DPNBUILD_ONLYONEADAPTER
  111. #define DPNBUILD_ONLYONENATHELP
  112. #define DPNBUILD_ONLYONEPROCESSOR
  113. #define DPNBUILD_ONLYONESP
  114. #define DPNBUILD_ONLYONETHREAD
  115. #define DPNBUILD_ONLYWINSOCK2
  116. #define DPNBUILD_SECURETRANSPORT
  117. #define DPNBUILD_SINGLEPROCESS
  118. #ifdef DBG
  119. //==============================================================
  120. // Debug Xbox build specific defines
  121. //==============================================================
  122. #else // ! DBG
  123. //==============================================================
  124. // Retail Xbox build specific defines
  125. //==============================================================
  126. //
  127. // Don't include parameter validation or the Protocol test
  128. // interface.
  129. //
  130. #define DPNBUILD_NOPARAMVAL
  131. #define DPNBUILD_NOPROTOCOLTESTITF
  132. #endif // ! DBG
  133. #else // ! _XBOX
  134. //===================================================================
  135. // Desktop specific defines
  136. //===================================================================
  137. //
  138. // _WIN32_DCOM allows us to use CoInitializeEx.
  139. //
  140. #ifndef _WIN32_DCOM
  141. #define _WIN32_DCOM
  142. #endif
  143. //
  144. // Multicast support is not ready for prime-time yet.
  145. //
  146. #define DPNBUILD_NOMULTICAST
  147. #ifdef WINNT
  148. //==============================================================
  149. // Windows NT specific defines
  150. //==============================================================
  151. #ifdef WIN95
  152. #error("WINNT and WIN95 cannot both be defined!")
  153. #endif // WIN95
  154. //
  155. // Windows NT builds Unicode
  156. //
  157. #define UNICODE
  158. #define _UNICODE
  159. //
  160. // When building under Visual C++ 6.0, we need to make sure
  161. // certain "advanced" features are available. There's probably a
  162. // better way to tell what environment is being used, but for
  163. // now, we'll use ! DPNBUILD_ENV_NT.
  164. //
  165. #ifndef DPNBUILD_ENV_NT
  166. #define _WIN32_WINNT 0x0500
  167. #endif // ! DPNBUILD_ENV_NT
  168. //
  169. // 64-bit Windows never supported legacy DPlay (other than via
  170. // WOW).
  171. //
  172. #ifdef _WIN64
  173. #define DPNBUILD_NOLEGACYDP
  174. #endif // _WIN64
  175. //
  176. // NT doesn't need to support Winsock 1.
  177. //
  178. #define DPNBUILD_ONLYWINSOCK2
  179. //
  180. // IPv6 support is not ready for prime-time yet.
  181. //
  182. #define DPNBUILD_NOIPV6
  183. #ifdef DBG
  184. //===========================================================
  185. // Debug NT build specific defines
  186. //===========================================================
  187. #else // ! DBG
  188. //===========================================================
  189. // Retail NT build specific defines
  190. //===========================================================
  191. #define DPNBUILD_NOPROTOCOLTESTITF
  192. #endif // ! DBG
  193. #else // ! WINNT
  194. //===============================================================
  195. // Windows 9x specific defines
  196. //===============================================================
  197. #ifndef WIN95
  198. #error("One of WINCE, _XBOX, WINNT, or WIN95 must be defined!")
  199. #endif // ! WIN95
  200. //
  201. // Windows 9x is single processor only.
  202. //
  203. #define DPNBUILD_ONLYONEPROCESSOR
  204. //
  205. // Windows 9x will never support IPv6.
  206. //
  207. #define DPNBUILD_NOIPV6
  208. #ifdef DBG
  209. //===========================================================
  210. // Debug 9x build specific defines
  211. //===========================================================
  212. #else // ! DBG
  213. //===========================================================
  214. // Retail 9x build specific defines
  215. //===========================================================
  216. #define DPNBUILD_NOPROTOCOLTESTITF
  217. #endif // ! DBG
  218. #endif // ! WINNT
  219. #endif // ! _XBOX
  220. #endif // ! WINCE
  221. //=============================================================================
  222. // Print the current settings
  223. //=============================================================================
  224. #pragma message("Defines in use:")
  225. //
  226. // _ARM_ - Compile for ARM processors
  227. //
  228. #ifdef _ARM_
  229. #pragma message(" _ARM_")
  230. #endif
  231. //
  232. // _AMD64_ - Compile for AMD64 processors
  233. //
  234. #ifdef _AMD64_
  235. #pragma message(" _AMD64_")
  236. #endif
  237. //
  238. // DX_FINAL_RELEASE - Controls whether or not the DX time bomb is present
  239. //
  240. #ifdef DX_FINAL_RELEASE
  241. #pragma message(" DX_FINAL_RELEASE")
  242. #endif
  243. //
  244. // _IA64_ - Compile for IA64 processors
  245. //
  246. #ifdef _IA64_
  247. #pragma message(" _IA64_")
  248. #endif
  249. //
  250. // UNICODE - Set to make the build Unicode.
  251. //
  252. #ifdef UNICODE
  253. #pragma message(" UNICODE")
  254. #endif
  255. //
  256. // _WIN64 - 64-bit windows
  257. //
  258. #ifdef _WIN64
  259. #pragma message(" _WIN64")
  260. #endif
  261. //
  262. // WINCE - Not _WIN64, _XBOX, WINNT, or WIN95
  263. //
  264. #ifdef WINCE
  265. #pragma message(" WINCE")
  266. #endif
  267. //
  268. // WINNT - Not WINCE, _XBOX, or WIN95
  269. //
  270. #ifdef WINNT
  271. #pragma message(" WINNT")
  272. #endif
  273. //
  274. // WIN95 - Not WINCE, _XBOX, or WINNT
  275. //
  276. #ifdef WIN95
  277. #pragma message(" WIN95")
  278. #endif
  279. //
  280. // WINCE_ON_DESKTOP - Used to make a desktop CE-like build
  281. //
  282. #ifdef WINCE_ON_DESKTOP
  283. #pragma message(" WINCE_ON_DESKTOP")
  284. #endif
  285. //
  286. // _X86_ - Compile for Intel x86 processors
  287. //
  288. #ifdef _X86_
  289. #pragma message(" _X86_")
  290. #endif
  291. //
  292. // _XBOX - Not _WIN64, WINCE, WINNT, or WIN95
  293. //
  294. #ifdef _XBOX
  295. #pragma message(" _XBOX")
  296. #endif
  297. //
  298. // XBOX_ON_DESKTOP - Used to make a desktop Xbox-like build
  299. //
  300. #ifdef XBOX_ON_DESKTOP
  301. #pragma message(" XBOX_ON_DESKTOP")
  302. #endif
  303. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  304. //
  305. // DPNBUILD_ADVANCEDICSADAPTERSELECTIONLOGIC - Have the SP try to be smart about the adapter to use for enumerating/connecting on Internet Connection Sharing machines
  306. //
  307. #ifdef DPNBUILD_ADVANCEDICSADAPTERSELECTIONLOGIC
  308. #pragma message(" DPNBUILD_ADVANCEDICSADAPTERSELECTIONLOGIC")
  309. #endif
  310. //
  311. // DPNBUILD_DONTCHECKFORMISSEDTIMERS - Don't have the unified thread pool check for missed short timers
  312. //
  313. #ifdef DPNBUILD_DONTCHECKFORMISSEDTIMERS
  314. #pragma message(" DPNBUILD_DONTCHECKFORMISSEDTIMERS")
  315. #endif
  316. //
  317. // DPNBUILD_DYNAMICTIMERSETTINGS - Store timer settings at run time so they can be dynamically changed
  318. //
  319. #ifdef DPNBUILD_DYNAMICTIMERSETTINGS
  320. #pragma message(" DPNBUILD_DYNAMICTIMERSETTINGS")
  321. #endif
  322. //
  323. // DPNBUILD_ENV_NT - Building under the NT build environment
  324. //
  325. #ifdef DPNBUILD_ENV_NT
  326. #pragma message(" DPNBUILD_ENV_NT")
  327. #endif
  328. //
  329. // DPNBUILD_FIXEDMEMORYMODEL - Set a cap on the maximum amount of memory that can be allocated
  330. //
  331. #ifdef DPNBUILD_FIXEDMEMORYMODEL
  332. #pragma message(" DPNBUILD_FIXEDMEMORYMODEL")
  333. #endif
  334. //
  335. // DPNBUILD_LIBINTERFACE - Use a lib interface instead of a COM style interface
  336. //
  337. #ifdef DPNBUILD_LIBINTERFACE
  338. #pragma message(" DPNBUILD_LIBINTERFACE")
  339. #endif
  340. //
  341. // DPNBUILD_NOCOMEMULATION - Set for platforms that don't need the COM emulation layer
  342. //
  343. #ifdef DPNBUILD_NOCOMEMULATION
  344. #pragma message(" DPNBUILD_NOCOMEMULATION")
  345. #endif
  346. //
  347. // DPNBUILD_NOCOMREGISTER - Don't implement DllRegisterServer and DllUnregisterServer
  348. //
  349. #ifdef DPNBUILD_NOCOMREGISTER
  350. #pragma message(" DPNBUILD_NOCOMREGISTER")
  351. #endif
  352. //
  353. // DPNBUILD_NOHNETFWAPI - Used in NAT Help when Home Networking firewall traversal API isn't available
  354. //
  355. #ifdef DPNBUILD_NOHNETFWAPI
  356. #pragma message(" DPNBUILD_NOHNETFWAPI")
  357. #endif
  358. //
  359. // DPNBUILD_NOHOSTMIGRATE - Removes the Peer Host Migration feature
  360. //
  361. #ifdef DPNBUILD_NOHOSTMIGRATE
  362. #pragma message(" DPNBUILD_NOHOSTMIGRATE")
  363. #endif
  364. //
  365. // DPNBUILD_NOIMAGEHLP - Set for platforms where Imagehlp.dll is not available
  366. //
  367. #ifdef DPNBUILD_NOIMAGEHLP
  368. #pragma message(" DPNBUILD_NOIMAGEHLP")
  369. #endif
  370. //
  371. // DPNBUILD_NOIPX - Remove the IPX service provider
  372. //
  373. #ifdef DPNBUILD_NOIPX
  374. #pragma message(" DPNBUILD_NOIPX")
  375. #endif
  376. //
  377. // DPNBUILD_NOIPV6 - Remove the IPv6 service provider
  378. //
  379. #ifdef DPNBUILD_NOIPV6
  380. #pragma message(" DPNBUILD_NOIPV6")
  381. #endif
  382. //
  383. // DPNBUILD_NOLEGACYDP - Remove IDirectPlay4 addressing support
  384. //
  385. #ifdef DPNBUILD_NOLEGACYDP
  386. #pragma message(" DPNBUILD_NOLEGACYDP")
  387. #endif
  388. //
  389. // DPNBUILD_NOLOBBY - Remove lobby support from core.
  390. //
  391. #ifdef DPNBUILD_NOLOBBY
  392. #pragma message(" DPNBUILD_NOLOBBY")
  393. #endif
  394. //
  395. // DPNBUILD_NOLOCALNAT - Remove support for a local Internet gateway
  396. //
  397. #ifdef DPNBUILD_NOLOCALNAT
  398. #pragma message(" DPNBUILD_NOLOCALNAT")
  399. #endif
  400. //
  401. // DPNBUILD_NOMISSEDTIMERSHINT - Don't have the unified thread pool try to hint about possible missed short timers
  402. //
  403. #ifdef DPNBUILD_NOMISSEDTIMERSHINT
  404. #pragma message(" DPNBUILD_NOMISSEDTIMERSHINT")
  405. #endif
  406. //
  407. // DPNBUILD_NOMULTICAST - Used to disable multicast capabilities
  408. //
  409. #ifdef DPNBUILD_NOMULTICAST
  410. #pragma message(" DPNBUILD_NOMULTICAST")
  411. #endif
  412. //
  413. // DPNBUILD_NONATHELP - Remove use of NatHelp from DPlay
  414. //
  415. #ifdef DPNBUILD_NONATHELP
  416. #pragma message(" DPNBUILD_NONATHELP")
  417. #endif
  418. //
  419. // DPNBUILD_NOPARAMVAL - Parameter validation - ON for CE & Xbox Retail, OFF for Debug
  420. //
  421. #ifdef DPNBUILD_NOPARAMVAL
  422. #pragma message(" DPNBUILD_NOPARAMVAL")
  423. #endif
  424. //
  425. // DPNBUILD_NOPROTOCOLTESTITF - Removes the Protocol testing interface. ON in Retail, OFF in Debug
  426. //
  427. #ifdef DPNBUILD_NOPROTOCOLTESTITF
  428. #pragma message(" DPNBUILD_NOPROTOCOLTESTITF")
  429. #endif
  430. //
  431. // DPNBUILD_NOREGISTRY - Removes registry based override parameters from DPlay
  432. //
  433. #ifdef DPNBUILD_NOREGISTRY
  434. #pragma message(" DPNBUILD_NOREGISTRY")
  435. #endif
  436. //
  437. // DPNBUILD_NOSERIALSP - Remove the Serial and Modem service providers
  438. //
  439. #ifdef DPNBUILD_NOSERIALSP
  440. #pragma message(" DPNBUILD_NOSERIALSP")
  441. #endif
  442. //
  443. // DPNBUILD_NOSERVER - Removes the IDirectPlay8Server interface, allowing only Client and Peer-to-Peer
  444. //
  445. #ifdef DPNBUILD_NOSERVER
  446. #pragma message(" DPNBUILD_NOSERVER")
  447. #endif
  448. //
  449. // DPNBUILD_NOSPUI - No UI in the Service Providers
  450. //
  451. #ifdef DPNBUILD_NOSPUI
  452. #pragma message(" DPNBUILD_NOSPUI")
  453. #endif
  454. //
  455. // DPNBUILD_NOVOICE - Removes DirectPlay Voice support from DirectPlay
  456. //
  457. #ifdef DPNBUILD_NOVOICE
  458. #pragma message(" DPNBUILD_NOVOICE")
  459. #endif
  460. //
  461. // DPNBUILD_NOWAITABLETIMERSON9X - Don't use waitable timer objects in Windows 9x builds
  462. //
  463. #ifdef DPNBUILD_NOWAITABLETIMERSON9X
  464. #pragma message(" DPNBUILD_NOWAITABLETIMERSON9X")
  465. #endif
  466. //
  467. // DPNBUILD_NOWINMM - Set for platforms where winmm.dll is not available
  468. //
  469. #ifdef DPNBUILD_NOWINMM
  470. #pragma message(" DPNBUILD_NOWINMM")
  471. #endif
  472. //
  473. // DPNBUILD_NOWINSOCK2 - Force the IP Service Provider to only use Winsock 1 features
  474. //
  475. #ifdef DPNBUILD_NOWINSOCK2
  476. #pragma message(" DPNBUILD_NOWINSOCK2")
  477. #endif
  478. //
  479. // DPNBUILD_ONLYONEADAPTER - Uses simplified code that assumes only a single adapter/device exists per SP
  480. //
  481. #ifdef DPNBUILD_ONLYONEADAPTER
  482. #pragma message(" DPNBUILD_ONLYONEADAPTER")
  483. #endif
  484. //
  485. // DPNBUILD_ONLYONENATHELP - Uses simplified code that assumes only a single NAT Help provider exists
  486. //
  487. #ifdef DPNBUILD_ONLYONENATHELP
  488. #pragma message(" DPNBUILD_ONLYONENATHELP")
  489. #endif
  490. //
  491. // DPNBUILD_ONLYONEPROCESSOR - Uses simplified code that assumes that only one processor exists
  492. //
  493. #ifdef DPNBUILD_ONLYONEPROCESSOR
  494. #pragma message(" DPNBUILD_ONLYONEPROCESSOR")
  495. #endif
  496. //
  497. // DPNBUILD_ONLYONESP - Uses simplified code that assumes only a single service provider exists
  498. //
  499. #ifdef DPNBUILD_ONLYONESP
  500. #pragma message(" DPNBUILD_ONLYONESP")
  501. #endif
  502. //
  503. // DPNBUILD_ONLYONETHREAD - Uses simplified code that assumes only one thread will ever access DPlay
  504. //
  505. #ifdef DPNBUILD_ONLYONETHREAD
  506. #pragma message(" DPNBUILD_ONLYONETHREAD")
  507. #endif
  508. //
  509. // DPNBUILD_ONLYWINSOCK2 - Force the IP Service Provider to only use Winsock 2 features
  510. //
  511. #ifdef DPNBUILD_ONLYWINSOCK2
  512. #pragma message(" DPNBUILD_ONLYWINSOCK2")
  513. #endif
  514. //
  515. // DPNBUILD_PREALLOCATEDMEMORYMODEL - Pre-allocate a fixed working set of memory up front, don't allow additional allocations
  516. //
  517. #ifdef DPNBUILD_PREALLOCATEDMEMORYMODEL
  518. #pragma message(" DPNBUILD_PREALLOCATEDMEMORYMODEL")
  519. #endif
  520. //
  521. // DPNBUILD_SINGLEPROCESS - Integrates DPNSVR code into the main DLL and assumes only a single process will use DPlay at a time
  522. //
  523. #ifdef DPNBUILD_SINGLEPROCESS
  524. #pragma message(" DPNBUILD_SINGLEPROCESS")
  525. #endif
  526. //
  527. // DPNBUILD_USEASSUME - Uses the __assume compiler key word for DNASSERTs in retail builds
  528. //
  529. #ifdef DPNBUILD_USEASSUME
  530. #pragma message(" DPNBUILD_USEASSUME")
  531. #endif