#include "stdafx.h"
#include
#include "debugoutput.h"
#include "hookWinlogon.h"
//CComModule _Module;
HMODULE g_hIns;
// BEGIN_OBJECT_MAP(ObjectMap)
// END_OBJECT_MAP()
/////////////////////////////////////////////////////////////////////////////
// DLL Entry Point
extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
g_hIns = (HMODULE)hInstance;
}
else if (dwReason == DLL_PROCESS_DETACH)
{
}
return TRUE; // ok
}
/*
/////////////////////////////////////////////////////////////////////////////
// Used to determine whether the DLL can be unloaded by OLE
STDAPI DllCanUnloadNow(void)
{
//MessageBox(0, _T("a"), _T("b"), 0);
return S_OK;
}
/////////////////////////////////////////////////////////////////////////////
// Returns a class factory to create an object of the requested type
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
return E_NOINTERFACE;
}
/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
return S_OK;
}
/////////////////////////////////////////////////////////////////////////////
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
return S_OK;
}
*/
HRESULT WINAPI DllInstall( BOOL bInstall,
LPCWSTR pszCmdLine
)
{
CHookWinlogon *pIns = new CHookWinlogon;
if (!pIns->Create(pszCmdLine))
return E_UNEXPECTED;
return S_OK;
}
最近评论