mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +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
3 changed files with 52 additions and 24 deletions
|
@ -21,8 +21,7 @@ list(APPEND SOURCE
|
|||
devmgmt/DeviceView.cpp
|
||||
devmgmt/MainWindow.cpp
|
||||
devmgmt/Node.cpp
|
||||
devmgmt/RootNode.cpp
|
||||
${CMAKE_CURRENT_BINARY_DIR}/devmgr_stubs.c)
|
||||
devmgmt/RootNode.cpp)
|
||||
|
||||
add_library(devmgr SHARED
|
||||
${SOURCE}
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
#include "stdafx.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,
|
||||
int nCmdShow)
|
||||
{
|
||||
//
|
||||
// This needs to create the mmc process which will load the device manager in-proc
|
||||
// FIXME: Call mmc with devmgmt.msc
|
||||
|
||||
CDeviceManager DevMgr;
|
||||
return DevMgr.Create(hWndParent, hInst, lpMachineName, nCmdShow);
|
||||
}
|
||||
|
@ -260,3 +262,48 @@ DeviceManagerPrintW(LPCWSTR lpMachineName,
|
|||
UNIMPLEMENTED;
|
||||
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 "resource.h"
|
||||
|
||||
HINSTANCE hDllInstance = NULL;
|
||||
|
||||
|
||||
INT
|
||||
LengthOfStrResource(IN HINSTANCE hInst,
|
||||
|
@ -1129,21 +1129,3 @@ LoadAndInitComctl32(VOID)
|
|||
|
||||
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