Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
//
// DLLENTRY.C
//
// Copyright (C) Microsoft Corporation, 1995
//
#include "pch.h"
#ifdef USEHEAP
#define RGHEAP_SIZE 9256*1024
HANDLE g_RgHeap = NULL; #endif
BOOL WINAPI VMMRegDllEntry( HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved ) {
switch (dwReason) {
case DLL_PROCESS_ATTACH: #ifdef USEHEAP
if ((g_RgHeap = HeapCreate(0, RGHEAP_SIZE, RGHEAP_SIZE)) == NULL) return FALSE; #endif
if (VMMRegLibAttach(0) != ERROR_SUCCESS) return FALSE;
break;
case DLL_PROCESS_DETACH: VMMRegLibDetach();
#ifdef USEHEAP
if (g_RgHeap != NULL) HeapDestroy(g_RgHeap); #endif
break;
}
return TRUE;
}
|