Author: dchapyshev
Date: Wed Jan 7 04:58:29 2009
New Revision: 38626
URL:
http://svn.reactos.org/svn/reactos?rev=38626&view=rev
Log:
- Set parent window for the wizard
- Call DisableThreadLibraryCalls for DLL_PROCESS_ATTACH case
Modified:
trunk/reactos/dll/cpl/hdwwiz/hdwwiz.c
Modified: trunk/reactos/dll/cpl/hdwwiz/hdwwiz.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/hdwwiz/hdwwiz.c?re…
==============================================================================
--- trunk/reactos/dll/cpl/hdwwiz/hdwwiz.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/hdwwiz/hdwwiz.c [iso-8859-1] Wed Jan 7 04:58:29 2009
@@ -45,11 +45,7 @@
typedef BOOL (WINAPI *PINSTALL_NEW_DEVICE)(HWND, LPGUID, PDWORD);
-BOOL CALLBACK
-InstallNewDevice(HWND hwndParent, LPGUID ClassGuid, PDWORD pReboot)
-{
- return FALSE;
-}
+/* STATIC FUNCTIONS *********************************************************/
static HFONT
CreateTitleFont(VOID)
@@ -224,7 +220,7 @@
psh.dwSize = sizeof(PROPSHEETHEADER);
psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER;
psh.hInstance = hApplet;
- psh.hwndParent = NULL;
+ psh.hwndParent = hwnd;
psh.nPages = nPages;
psh.nStartPage = 0;
psh.phpage = ahpsp;
@@ -240,7 +236,15 @@
DeleteObject(hTitleFont);
}
-VOID CALLBACK
+/* FUNCTIONS ****************************************************************/
+
+BOOL WINAPI
+InstallNewDevice(HWND hwndParent, LPGUID ClassGuid, PDWORD pReboot)
+{
+ return FALSE;
+}
+
+VOID WINAPI
AddHardwareWizard(HWND hwnd, LPWSTR lpName)
{
if (lpName != NULL)
@@ -254,10 +258,7 @@
/* Control Panel Callback */
LONG CALLBACK
-CPlApplet(HWND hwndCpl,
- UINT uMsg,
- LPARAM lParam1,
- LPARAM lParam2)
+CPlApplet(HWND hwndCpl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
{
switch (uMsg)
{
@@ -285,7 +286,6 @@
return FALSE;
}
-
BOOL WINAPI
DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
{
@@ -295,6 +295,7 @@
{
case DLL_PROCESS_ATTACH:
hApplet = hinstDLL;
+ DisableThreadLibraryCalls(hinstDLL);
break;
}