mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 00:13:57 +00:00
[DEVMGR]
Fix building with cmake (msvc) It needs my local ATL changes to build, I'll add these soon svn path=/trunk/; revision=69325
This commit is contained in:
parent
0e86ca73d0
commit
0baf2174fc
|
@ -21,8 +21,7 @@ list(APPEND SOURCE
|
||||||
devmgmt/DeviceView.cpp
|
devmgmt/DeviceView.cpp
|
||||||
devmgmt/MainWindow.cpp
|
devmgmt/MainWindow.cpp
|
||||||
devmgmt/Node.cpp
|
devmgmt/Node.cpp
|
||||||
devmgmt/RootNode.cpp
|
devmgmt/RootNode.cpp)
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/devmgr_stubs.c)
|
|
||||||
|
|
||||||
add_library(devmgr SHARED
|
add_library(devmgr SHARED
|
||||||
${SOURCE}
|
${SOURCE}
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "devmgmt\MainWindow.h"
|
#include "devmgmt\MainWindow.h"
|
||||||
|
|
||||||
#define UNIMPLEMENTED
|
HINSTANCE hDllInstance = NULL;
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(devmgr);
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
@ -91,8 +93,8 @@ DeviceManager_ExecuteW(HWND hWndParent,
|
||||||
LPCWSTR lpMachineName,
|
LPCWSTR lpMachineName,
|
||||||
int nCmdShow)
|
int nCmdShow)
|
||||||
{
|
{
|
||||||
//
|
// FIXME: Call mmc with devmgmt.msc
|
||||||
// This needs to create the mmc process which will load the device manager in-proc
|
|
||||||
CDeviceManager DevMgr;
|
CDeviceManager DevMgr;
|
||||||
return DevMgr.Create(hWndParent, hInst, lpMachineName, nCmdShow);
|
return DevMgr.Create(hWndParent, hInst, lpMachineName, nCmdShow);
|
||||||
}
|
}
|
||||||
|
@ -260,3 +262,48 @@ DeviceManagerPrintW(LPCWSTR lpMachineName,
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
WINAPI
|
||||||
|
DllMain(IN HINSTANCE hinstDLL,
|
||||||
|
IN DWORD dwReason,
|
||||||
|
IN LPVOID lpvReserved)
|
||||||
|
{
|
||||||
|
switch (dwReason)
|
||||||
|
{
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
|
hDllInstance = hinstDLL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
class CDevMgrUIModule : public CComModule
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
};
|
||||||
|
|
||||||
|
CDevMgrUIModule gModule;
|
||||||
|
|
||||||
|
STDAPI DllCanUnloadNow()
|
||||||
|
{
|
||||||
|
return gModule.DllCanUnloadNow();
|
||||||
|
}
|
||||||
|
|
||||||
|
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||||
|
{
|
||||||
|
return gModule.DllGetClassObject(rclsid, riid, ppv);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDAPI DllRegisterServer()
|
||||||
|
{
|
||||||
|
return gModule.DllRegisterServer(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDAPI DllUnregisterServer()
|
||||||
|
{
|
||||||
|
return gModule.DllUnregisterServer(FALSE);
|
||||||
|
}
|
|
@ -30,7 +30,7 @@
|
||||||
#include "properties.h"
|
#include "properties.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
HINSTANCE hDllInstance = NULL;
|
|
||||||
|
|
||||||
INT
|
INT
|
||||||
LengthOfStrResource(IN HINSTANCE hInst,
|
LengthOfStrResource(IN HINSTANCE hInst,
|
||||||
|
@ -1129,21 +1129,3 @@ LoadAndInitComctl32(VOID)
|
||||||
|
|
||||||
return hComCtl32;
|
return hComCtl32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL
|
|
||||||
WINAPI
|
|
||||||
DllMain(IN HINSTANCE hinstDLL,
|
|
||||||
IN DWORD dwReason,
|
|
||||||
IN LPVOID lpvReserved)
|
|
||||||
{
|
|
||||||
switch (dwReason)
|
|
||||||
{
|
|
||||||
case DLL_PROCESS_ATTACH:
|
|
||||||
DisableThreadLibraryCalls(hinstDLL);
|
|
||||||
hDllInstance = hinstDLL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue