mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 00:16:40 +00:00
[SYSSETUP]
* Add a way to register typelibs using the TypeLibraries section in syssetup.inf. Brought to you by Giannis Adamopoulos. svn path=/trunk/; revision=59028
This commit is contained in:
parent
5d953ac4b4
commit
ce296e920c
4 changed files with 64 additions and 1 deletions
|
@ -15,7 +15,7 @@ list(APPEND SOURCE
|
|||
add_library(syssetup SHARED ${SOURCE})
|
||||
add_pch(syssetup precomp.h)
|
||||
set_module_type(syssetup win32dll UNICODE)
|
||||
target_link_libraries(syssetup uuid ${PSEH_LIB})
|
||||
target_link_libraries(syssetup uuid wine ${PSEH_LIB})
|
||||
|
||||
add_importlibs(syssetup
|
||||
msvcrt
|
||||
|
|
|
@ -61,6 +61,8 @@ extern HINSTANCE hDllInstance;
|
|||
extern HINF hSysSetupInf;
|
||||
extern SETUPDATA SetupData;
|
||||
|
||||
BOOL RegisterTypeLibraries (HINF hinf, LPCWSTR szSection);
|
||||
|
||||
/* security.c */
|
||||
NTSTATUS SetAccountDomain(LPCWSTR DomainName,
|
||||
PSID DomainSid);
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
#include <rpcproxy.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
|
@ -393,6 +395,61 @@ InstallSysSetupInfComponents(VOID)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BOOL
|
||||
RegisterTypeLibraries (HINF hinf, LPCWSTR szSection)
|
||||
{
|
||||
INFCONTEXT InfContext;
|
||||
BOOL res;
|
||||
WCHAR szName[MAX_PATH];
|
||||
WCHAR szPath[MAX_PATH];
|
||||
INT csidl;
|
||||
LPWSTR p;
|
||||
HMODULE hmod;
|
||||
HRESULT hret;
|
||||
|
||||
/* Begin iterating the entries in the inf section */
|
||||
res = SetupFindFirstLine(hinf, szSection, NULL, &InfContext);
|
||||
if (!res) return FALSE;
|
||||
|
||||
do
|
||||
{
|
||||
/* Get the name of the current type library */
|
||||
if (!SetupGetStringFieldW(&InfContext, 1, szName, MAX_PATH, NULL))
|
||||
{
|
||||
FatalError("SetupGetStringFieldW failed\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!SetupGetIntField(&InfContext, 2, &csidl))
|
||||
csidl = CSIDL_SYSTEM;
|
||||
|
||||
hret = SHGetFolderPathW(NULL, csidl, NULL, 0, szPath);
|
||||
if (FAILED(hret))
|
||||
{
|
||||
FatalError("SHGetSpecialFolderPathW failed hret=0x%d\n", hret);
|
||||
continue;
|
||||
}
|
||||
|
||||
p = PathAddBackslash(szPath);
|
||||
_tcscpy(p, szName);
|
||||
|
||||
hmod = LoadLibraryW(szName);
|
||||
if (hmod == NULL)
|
||||
{
|
||||
FatalError("LoadLibraryW failed\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
__wine_register_resources(hmod);
|
||||
|
||||
}while (SetupFindNextLine(&InfContext, &InfContext));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL
|
||||
EnableUserModePnpManager(VOID)
|
||||
{
|
||||
|
@ -668,6 +725,8 @@ InstallLiveCD(IN HINSTANCE hInstance)
|
|||
{
|
||||
DPRINT1("SetupInstallFromInfSectionW failed!\n");
|
||||
}
|
||||
|
||||
RegisterTypeLibraries(hSysSetupInf, L"TypeLibraries");
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
|
|
|
@ -1685,6 +1685,8 @@ RegistrationProc(LPVOID Parameter)
|
|||
SetupTermDefaultQueueCallback(RegistrationData->DefaultContext);
|
||||
HeapFree(GetProcessHeap(), 0, RegistrationData);
|
||||
|
||||
RegisterTypeLibraries(hSysSetupInf, L"TypeLibraries");
|
||||
|
||||
// FIXME: Move this call to a separate cleanup page!
|
||||
RtlCreateBootStatusDataFile();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue