THIPX32C.CPP 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Command & Conquer 95 *
  23. * *
  24. * File Name : THIPX16C.CPP *
  25. * *
  26. * Programmer : Steve Tall *
  27. * *
  28. * Start Date : 1/15/96 *
  29. * *
  30. * Last Update : January 29thth 1996 [ST] *
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Overview: *
  34. * *
  35. * 'C' code for the 32 bit IPX library. This library 'thunks' down to a 16bit .dll *
  36. * *
  37. *---------------------------------------------------------------------------------------------*
  38. * *
  39. * Functions: *
  40. * DllMain -- called each time a new app requests use of the .dll *
  41. * *
  42. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  43. #define WIN32
  44. #ifndef _WIN32 // Denzil 6/2/98 Watcom 11.0 complains without this check
  45. #define _WIN32
  46. #endif // _WIN32
  47. #include <windows.h>
  48. extern "C" {
  49. BOOL WINAPI Thipx_ThunkConnect32(LPSTR pszDll16, LPSTR pszDll32, DWORD hIinst, DWORD dwReason);
  50. };
  51. /***********************************************************************************************
  52. * DllMain -- called every time a new app requests use of the .dll *
  53. * *
  54. * *
  55. * *
  56. * INPUT: usual windoze junk *
  57. * *
  58. * OUTPUT: true *
  59. * *
  60. * WARNINGS: None *
  61. * *
  62. * HISTORY: *
  63. * 1/29/96 10:55AM ST : Created *
  64. *=============================================================================================*/
  65. BOOL APIENTRY DllMain(DWORD hInst, DWORD dwReason, DWORD dwReserved)
  66. {
  67. if (! Thipx_ThunkConnect32("THIPX16.DLL", "THIPX32.DLL", hInst, dwReason)) {
  68. return FALSE;
  69. }
  70. return (TRUE);
  71. }
  72. /***********************************************************************************************
  73. * LibMain -- This just calls DllMain. Watcom erroneously links this in as the entry point! *
  74. * *
  75. * *
  76. * *
  77. * INPUT: Nothing *
  78. * *
  79. * OUTPUT: Nothing *
  80. * *
  81. * WARNINGS: None *
  82. * *
  83. * HISTORY: *
  84. * 1/29/96 10:56AM ST : Created *
  85. *=============================================================================================*/
  86. BOOL APIENTRY LibMain(DWORD hInst, DWORD dwReason, DWORD dwReserved)
  87. {
  88. return (DllMain(hInst, dwReason, dwReserved));
  89. }