/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Apache License, Version 2.0. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the Apache License, Version 2.0, please send an email to 
 * vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Apache License, Version 2.0.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * ***************************************************************************/

// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include <stdio.h>


// Used by debugger to detect when DLL is fully loaded and initialized and TraceFunc can be registered.
extern "C" {
    __declspec(dllexport)
    volatile char isInitialized;

    __declspec(dllexport)
    void OnInitialized() {
        volatile char dummy = 0;
    }
}


BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
    if (ul_reason_for_call == DLL_PROCESS_ATTACH) {
        isInitialized = 1;
        OnInitialized();
    }

    return TRUE;
}

/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Apache License, Version 2.0. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the Apache License, Version 2.0, please send an email to 
 * vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Apache License, Version 2.0.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * ***************************************************************************/

// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include <stdio.h>


// Used by debugger to detect when DLL is fully loaded and initialized and TraceFunc can be registered.
extern "C" {
    __declspec(dllexport)
    volatile char isInitialized;

    __declspec(dllexport) __declspec(noinline)
    void OnInitialized() {
        volatile char dummy = 0;
    }
}


BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
    if (ul_reason_for_call == DLL_PROCESS_ATTACH) {
        isInitialized = 1;
        OnInitialized();
    }

    return TRUE;
}

Fix mixed-mode debugging on release PTVS builds.
Fix mixed-mode debugging on release PTVS builds.
