Changeset 21876 for branches/gcc-kmk/src
- Timestamp:
- Dec 9, 2011, 9:41:08 PM (14 years ago)
- Location:
- branches/gcc-kmk/src
- Files:
-
- 1 added
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/src/Makefile.kmk
r21875 r21876 37 37 include $(PATH_SUB_CURRENT)/comdlg32/Makefile.kmk 38 38 include $(PATH_SUB_CURRENT)/ddraw/Makefile.kmk 39 include $(PATH_SUB_CURRENT)/dinput/Makefile.kmk 39 40 include $(PATH_SUB_CURRENT)/crypt32/Makefile.kmk 40 41 include $(PATH_SUB_CURRENT)/ctl3d32/Makefile.kmk -
branches/gcc-kmk/src/dinput/dinput.def
r8346 r21876 13 13 14 14 EXPORTS 15 DirectInputCreateA = _DirectInputCreateA@16@115 DirectInputCreateA = "_DirectInputCreateA@16" @1 16 16 ; DirectInputCreateW = _DirectInputCreateW@16 @2 17 DirectInputCreateEx = _DirectInputCreateEx@20@318 DllCanUnloadNow = _DINPUT_DllCanUnloadNow@0@419 DllGetClassObject = _DINPUT_DllGetClassObject@12@520 DllRegisterServer = _DINPUT_DllRegisterServer@0@621 DllUnregisterServer = _DINPUT_DllUnregisterServer@0@717 DirectInputCreateEx = "_DirectInputCreateEx@20" @3 18 DllCanUnloadNow = "_DINPUT_DllCanUnloadNow@0" @4 19 DllGetClassObject = "_DINPUT_DllGetClassObject@12" @5 20 DllRegisterServer = "_DINPUT_DllRegisterServer@0" @6 21 DllUnregisterServer = "_DINPUT_DllUnregisterServer@0" @7 22 22 -
branches/gcc-kmk/src/dinput/dinput_main.c
r9016 r21876 319 319 320 320 #if !defined(__STRICT_ANSI__) && defined(__GNUC__) 321 # define XCAST(fun) (typeof(ddi7avt.f un))321 # define XCAST(fun) (typeof(ddi7avt.fn##fun)) 322 322 #else 323 323 # define XCAST(fun) (void*) … … 340 340 341 341 #if !defined(__STRICT_ANSI__) && defined(__GNUC__) 342 # define XCAST(fun) (typeof(ddi8avt.f un))342 # define XCAST(fun) (typeof(ddi8avt.fn##fun)) 343 343 #else 344 344 # define XCAST(fun) (void*) -
branches/gcc-kmk/src/dinput/initterm.cpp
r21842 r21876 1 /* $Id: init dinput.cpp,v 1.2 2002-05-15 09:29:27sandervl Exp $ */1 /* $Id: initterm.cpp,v 1.3 2002-04-30 14:52:03 sandervl Exp $ */ 2 2 /* 3 * COMCTL32DLL entry point3 * DINPUT DLL entry point 4 4 * 5 5 * Copyright 1998 Sander van Leeuwen … … 8 8 * 9 9 * Project Odin Software License can be found in LICENSE.TXT 10 *11 *12 10 */ 13 11 14 /*-------------------------------------------------------------*/15 /* INITERM.C -- Source for a custom dynamic link library */16 /* initialization and termination (_DLL_InitTerm) */17 /* function. */18 /* */19 /* When called to perform initialization, this sample function */20 /* gets storage for an array of integers, and initializes its */21 /* elements with random integers. At termination time, it */22 /* frees the array. Substitute your own special processing. */23 /*-------------------------------------------------------------*/24 25 26 /* Include files */27 12 #define INCL_DOSMODULEMGR 28 13 #define INCL_DOSPROCESS … … 37 22 #include <initdll.h> 38 23 24 // Win32 resource table (produced by wrc) 25 extern DWORD dinput_PEResTab; 26 39 27 extern "C" { 40 //Win32 resource table (produced by wrc) 41 extern DWORD dinput_PEResTab; 42 43 extern void mousedev_register(); 44 extern void keyboarddev_register(); 28 extern void mousedev_register(); 29 extern void keyboarddev_register(); 45 30 } 46 31 47 32 static HMODULE dllHandle = 0; 48 33 49 //******************************************************************************50 //******************************************************************************51 34 BOOL WINAPI DInputLibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 52 35 { … … 65 48 return FALSE; 66 49 } 67 /****************************************************************************/ 68 /* _DLL_InitTerm is the function that gets called by the operating system */ 69 /* loader when it loads and frees this DLL for each process that accesses */ 70 /* this DLL. However, it only gets called the first time the DLL is loaded */ 71 /* and the last time it is freed for a particular process. The system */ 72 /* linkage convention MUST be used because the operating system loader is */ 73 /* calling this function. */ 74 /****************************************************************************/ 75 ULONG APIENTRY inittermDInput(ULONG hModule, ULONG ulFlag) 50 51 ULONG SYSTEM DLL_InitDInput(ULONG hModule) 76 52 { 77 size_t i; 78 APIRET rc; 53 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 79 54 80 /*-------------------------------------------------------------------------*/ 81 /* If ulFlag is zero then the DLL is being loaded so initialization should */ 82 /* be performed. If ulFlag is 1 then the DLL is being freed so */ 83 /* termination should be performed. */ 84 /*-------------------------------------------------------------------------*/ 55 dllHandle = RegisterLxDll(hModule, DInputLibMain, (PVOID)&dinput_PEResTab); 56 if (dllHandle == 0) 57 return -1; 85 58 86 switch (ulFlag) { 87 case 0 : 88 dllHandle = RegisterLxDll(hModule, DInputLibMain, (PVOID)&dinput_PEResTab); 89 if(dllHandle == 0) 90 return 0UL; 59 return 0; 60 } 91 61 92 break; 93 case 1 : 94 if(dllHandle) { 95 UnregisterLxDll(dllHandle); 96 } 97 break; 98 default : 99 return 0UL; 100 } 62 void SYSTEM DLL_TermDInput(ULONG hModule) 63 { 64 if (dllHandle) 65 UnregisterLxDll(dllHandle); 66 } 101 67 102 /***********************************************************/ 103 /* A non-zero value must be returned to indicate success. */ 104 /***********************************************************/ 105 return 1UL; 68 ULONG SYSTEM DLL_Init(ULONG hModule) 69 { 70 if (DLL_InitDefault(hModule) == -1) 71 return -1; 72 return DLL_InitDInput(hModule); 106 73 } 107 //****************************************************************************** 108 //****************************************************************************** 74 75 void SYSTEM DLL_Term(ULONG hModule) 76 { 77 DLL_TermDInput(hModule); 78 DLL_TermDefault(hModule); 79 }
Note:
See TracChangeset
for help on using the changeset viewer.