Changeset 22023 for trunk/tools/install/odininst.cpp
- Timestamp:
- Sep 26, 2012, 12:55:40 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/install/odininst.cpp
r21916 r22023 55 55 BOOL InitSystemAndRegistry(); 56 56 void SetupTimeZoneInfo(); 57 void RegisterDLLs(); 57 58 58 59 //****************************************************************************** … … 86 87 87 88 SetupTimeZoneInfo(); 89 90 RegisterDLLs(); 91 88 92 return 0; 89 93 } … … 1092 1096 //****************************************************************************** 1093 1097 //****************************************************************************** 1094 1098 void RegisterDLLs() 1099 { 1100 // Register a number of DLLs that perform necessary initialization in 1101 // DLLRegisterServer(). On a real machine this is done by regsvr32.exe 1102 // during installation. Since we don't have regsvr32.exe, we will call 1103 // this entry point manually from here. 1104 1105 char buf[sizeof(DIR_System)+260]; 1106 1107 const char *DLLs[] = { "RSAENH.DLL" }; 1108 1109 for (int i = 0; i < sizeof(DLLs)/sizeof(DLLs[0]); i++) 1110 { 1111 sprintf(buf, "%s\\%s", DIR_System, DLLs[i]); 1112 1113 dprintf(("RegisterDLLs: Registering %s", buf)); 1114 1115 HMODULE hmod = LoadLibrary(buf); 1116 if (!hmod) 1117 { 1118 dprintf(("RegisterDLLs: Unable to load DLL %s (error %d)", 1119 buf, GetLastError())); 1120 continue; 1121 } 1122 1123 typedef HRESULT WINAPI fnDllRegisterServer(); 1124 1125 fnDllRegisterServer *proc = (fnDllRegisterServer *) 1126 GetProcAddress(hmod, "DllRegisterServer"); 1127 if (!proc) 1128 { 1129 dprintf(("RegisterDLLs: Unable to find DllRegisterServer " 1130 "in %s (error %d)", buf, GetLastError())); 1131 } 1132 else 1133 { 1134 HRESULT hrc = proc(); 1135 if (hrc) 1136 dprintf(("RegisterDLLs: Calling DllRegisterServer " 1137 "in %s returned error %x", buf, hrc)); 1138 } 1139 1140 FreeLibrary(hmod); 1141 } 1142 1143 1144 ProcessEmbeddedFile(TimeZones, TRUE); 1145 } 1146 //****************************************************************************** 1147 //****************************************************************************** 1148
Note:
See TracChangeset
for help on using the changeset viewer.