#include "stdafx.h" #define WINVER 0x0500 #include <stdio.h> #include <windows.h> #include <conio.h> int main(int argc, char* argv[]) { DEVMODE dev; DWORD DispNum = 0; DISPLAY_DEVICE DisplayDevice; ZeroMemory(&DisplayDevice,sizeof(DisplayDevice)); EnumDisplayDevices(NULL, DispNum, &DisplayDevice, 0); return 0; }
Compiling... disp.cpp NOTE: WINVER has been defined as 0x0500 or greater which enables Windows NT 5.0 and Windows 98 features. When these headers were released, Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions. For this release when WINVER is defined as 0x0500 or greater, you can only build beta or test applications. To build a retail application, set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk to see if retail Windows NT 5.0 or Windows 98 headers are available. See the SDK release notes for more information. D:\Users\Dharmaraj\pratice\disp\disp.cpp(13) : warning C4101: 'dev' : unreferenced local variable Linking... disp.obj : error LNK2001: unresolved external symbol __imp__EnumDisplayDevicesA@16 Debug/disp.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)