LockWorkStation - Compilation error - identifier not found

Posted by Microkernel on Stack Overflow See other posts from Stack Overflow or by Microkernel
Published on 2010-03-24T15:59:47Z Indexed on 2010/03/24 16:13 UTC
Read the original article Hit count: 331

Hi All,

I am writing an application in which I got to lock the computer screen (OS is Windows). My Application is in C++. For this purpose I used the LockWorkStation() API defined on msdn, http://msdn.microsoft.com/en-us/library/aa376875%28VS.85%29.aspx

I have included windows.h as told but still I am getting compilation error:

.\source.cpp(5) : error C3861: 'LockWorkStation': identifier not found

here is a sample code thats giving error.

#include <Windows.h>
int main()
{
    LockWorkStation();
    return 0;
}

Please tell me what I am missing here :(

I am using MS-Visual studio 2005.

Regards.

© Stack Overflow or respective owner

Related posts about win32

Related posts about winapi