Problem Using ExitWindowsEx

Hello, after getting an answer about how to close the system, I have a different problem. I wrote the following code:



#include "stdafx.h"
#include <windows.h>

int _tmain(int argc, _TCHAR* argv[])
{
    ExitWindowsEx(EWX_FORCE,
    SHTDN_REASON_FLAG_PLANNED);
    return 0;
}

 

I get the following errors:
>error LNK2019: unresolved external symbol __imp__ExitWindowsEx@8 referenced in function _main
>fatal error LNK1120: 1 unresolved externals

With Thanks,
                   Gal Beniamini



Answer this question

Problem Using ExitWindowsEx