Solved

visual c++ compile error

Posted on 2004-03-29
9
374 Views
Last Modified: 2013-11-20
When I tried to compile a visual c++ project, I loaded the .dsw file and build it. But it always gave me the error:

Compiling...
VideoDisplay.cpp
C:\shiming\VirtualDub\sourcecode\VirtualDub\source\VideoDisplay.cpp(54) : error C2065: 'SM_REMOTESESSION' : undeclared identifier
C:\shiming\VirtualDub\sourcecode\VirtualDub\source\VideoDisplay.cpp(167) : error C2065: 'GetWindowLongPtr' : undeclared identifier
 ...

I mean, it didn't told me that it could not find the header file. But I think 'SM_REMOTESESSION' is defined by MSDN header. I downloaded SDK. I don't know what's the reason.

Anyone can help?

Thank you!
0
Comment
Question by:missdong
9 Comments
 
LVL 15

Accepted Solution

by:
lakshman_ce earned 75 total points
ID: 10709540
Try adding
#include <windows.h>
in your VideoDisplay.cpp file

-Lakshman
0
 
LVL 10

Expert Comment

by:Mercantilum
ID: 10709552
0
 
LVL 14

Expert Comment

by:wayside
ID: 10713697
SM_REMOTESESSION is defined in WinUser.h, which is in the platform SDK :

#if(WINVER >= 0x0500)
#define SM_REMOTESESSION        0x1000

...
#endif /* WINVER >= 0x0500 */
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 15

Expert Comment

by:lakshman_ce
ID: 10713786
In msdn you will find
Header: Declared in Winuser.h; include Windows.h.
means we just need to include Windows.h
For e.g you can have a look at the link,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getsystemmetrics.asp


-Lakshman
0
 

Expert Comment

by:dong9968
ID: 11857242
Thanks for all the help, now it works after I include windows.h in my cpp fie.

shiming
0
 

Expert Comment

by:dong9968
ID: 12006543
Thanks. Please close this question. It is solved
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 49
sumDigits challenge 9 150
no14 challenge 14 67
"Black Box" Testing of Control System Software 2 51
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question