mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 12:23:31 +00:00
Notify main thread in case of exception
svn path=/trunk/; revision=19797
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
<library>ole32</library>
|
||||
<library>shell32</library>
|
||||
<library>shlwapi</library>
|
||||
<library>pseh</library>
|
||||
<file>dllmain.c</file>
|
||||
<file>install.c</file>
|
||||
<file>logfile.c</file>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <tchar.h>
|
||||
#include <string.h>
|
||||
#include <setupapi.h>
|
||||
#include <pseh/pseh.h>
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/ntndk.h>
|
||||
|
||||
@@ -1421,25 +1422,42 @@ RegistrationProc(LPVOID Parameter)
|
||||
RegistrationData->Registered = 0;
|
||||
RegistrationData->DefaultContext = SetupInitDefaultQueueCallback(RegistrationData->hwndDlg);
|
||||
|
||||
if (SetupInstallFromInfSectionW(GetParent(RegistrationData->hwndDlg),
|
||||
hSysSetupInf,
|
||||
L"RegistrationPhase2",
|
||||
SPINST_REGISTRY |
|
||||
SPINST_REGISTERCALLBACKAWARE |
|
||||
SPINST_REGSVR,
|
||||
0,
|
||||
NULL,
|
||||
0,
|
||||
RegistrationNotificationProc,
|
||||
RegistrationData,
|
||||
NULL,
|
||||
NULL))
|
||||
_SEH_TRY
|
||||
{
|
||||
if (SetupInstallFromInfSectionW(GetParent(RegistrationData->hwndDlg),
|
||||
hSysSetupInf,
|
||||
L"RegistrationPhase2",
|
||||
SPINST_REGISTRY |
|
||||
SPINST_REGISTERCALLBACKAWARE |
|
||||
SPINST_REGSVR,
|
||||
0,
|
||||
NULL,
|
||||
0,
|
||||
RegistrationNotificationProc,
|
||||
RegistrationData,
|
||||
NULL,
|
||||
NULL))
|
||||
{
|
||||
LastError = NO_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
LastError = GetLastError();
|
||||
}
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
DPRINT("Catching exception\n");
|
||||
LastError = RtlNtStatusToDosError(_SEH_GetExceptionCode());
|
||||
}
|
||||
_SEH_END;
|
||||
|
||||
if (NO_ERROR == LastError)
|
||||
{
|
||||
RegistrationNotify.ErrorMessage = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LastError = GetLastError();
|
||||
DPRINT1("SetupInstallFromInfSection failed with error %u\n",
|
||||
LastError);
|
||||
if (0 == FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
|
||||
Reference in New Issue
Block a user