Home:ALL Converter>Visual studio compiler errors

Visual studio compiler errors

Ask Time:2019-11-10T19:26:54         Author:Just Gekto

Json Formatter

I am making c++ dll in visual studio community 2019 but as I created project its shows me errors. default code for c++ dll

// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

But visual studio gives these errors:

E1696   cannot open source file "windows.h"
E0020   identifier "BOOL" is undefined  
E0065   expected a ';'  4   

I have try messing with some settings which I seen on internet but that haven't helped.

Author:Just Gekto,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/58788186/visual-studio-compiler-errors
yy