(file) Return to Shim.c CVS log (file) (dir) Up to [OMI] / omi / nits / sample

File: [OMI] / omi / nits / sample / Shim.c (download)
Revision: 1.1, Mon Apr 20 17:19:54 2015 UTC (9 years, 2 months ago) by krisbash
Branch: MAIN
CVS Tags: OMI_1_0_8_2, OMI_1_0_8_1, HEAD
OMI 1.0.8-1

//*****************************************************************************
//	Copyright (C) 2003 Microsoft Corporation
//  All rights reserved.
//*****************************************************************************

#ifndef HOOK_BUILD
	#define HOOK_BUILD
#endif

#ifdef _MSC_VER
	#include <sal.h>
	#include <windows.h>
#endif

#include <nits/base/nits.h>

void *Shim_HeapAlloc(
    size_t bytes,
    NitsCallSite line)
{
    if (NitsShouldFault(line, NitsAutomatic))
    {
        return NULL;
    }

    return SystemMalloc(bytes);
}

BOOL Shim_SendRequest(
    PCWSTR str,
    NitsCallSite line)
{
    if (NitsShouldFault(line, NitsAutomatic))
    {
        return FALSE;
    }

#ifdef _MSC_VER
    OutputDebugString(str);
#endif
    return TRUE;
}

ViewCVS 0.9.2