Click here to Skip to main content
15,922,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: LNK2019 Error!!! Pin
Mark Salsbery3-Feb-07 10:17
Mark Salsbery3-Feb-07 10:17 
AnswerRe: LNK2019 Error!!! Pin
Hamid_RT3-Feb-07 23:53
Hamid_RT3-Feb-07 23:53 
News64-bit puzzle [modified] Pin
Karpov20073-Feb-07 8:14
Karpov20073-Feb-07 8:14 
GeneralRe: 64-bit puzzle Pin
Waldermort3-Feb-07 8:40
Waldermort3-Feb-07 8:40 
GeneralRe: 64-bit puzzle Pin
Karpov20073-Feb-07 9:35
Karpov20073-Feb-07 9:35 
GeneralRe: 64-bit puzzle Pin
Mark Salsbery3-Feb-07 10:38
Mark Salsbery3-Feb-07 10:38 
GeneralRe: 64-bit puzzle Pin
cmk3-Feb-07 13:08
cmk3-Feb-07 13:08 
GeneralRe: 64-bit puzzle Pin
Karpov20073-Feb-07 19:55
Karpov20073-Feb-07 19:55 
Thanks that have estimated an example. I know many other examples. Smile | :)

The example of the change in the virtual function behavior.
class CWinApp {<br />
  ...<br />
  virtual void WinHelp(DWORD_PTR dwData, UINT nCmd);<br />
  ...<br />
};<br />
<br />
class CSampleApp : public CWinApp {<br />
  ...<br />
  virtual void WinHelp(DWORD dwData, UINT nCmd);<br />
  ...<br />
};

It is the common example which the developer may face while porting his application to the 64-bit architecture. Let’s follow the life-cycle of the developing of some application. Suppose it was being developed for Visual Studio 6.0. at first when the function "WinHelp" in class "CWinApp" had the following prototype:

virtual void WinHelp(DWORD dwData, UINT nCmd = HELP_CONTEXT);

It would be absolutely correct to implement the overlap of the virtual function in class "CSampleApp", as it is shown in the example. Then the project was placed into Visual Studio 2005 where the prototype of the function in class "CWinApp" underwent changes that consist in replacing "DWORD" type with "DWORD_PTR" type. On the 32-bit platform this program will continue to work properly for here "DWORD" and "DWORD_PTR" types coincide. Troubles will occur while compliling this code for the 64-bit platform. We get two functions with the same names but with different parameters the result of which is that the user’s code won’t be called.

There are also other issues which can prove on a 64-bit platform. I recommend to familiarize with article: Evgeniy Ryzhkov "Peculiarities of the Development of 64-bit Applications" in which it is possible to learn a lot of interesting on the given subjects: http://www.viva64.com/articles.php
GeneralRe: 64-bit puzzle Pin
cmk3-Feb-07 20:22
cmk3-Feb-07 20:22 
GeneralRe: 64-bit puzzle Pin
Mark Salsbery4-Feb-07 7:59
Mark Salsbery4-Feb-07 7:59 
GeneralRe: 64-bit puzzle Pin
cmk4-Feb-07 13:11
cmk4-Feb-07 13:11 
GeneralRe: 64-bit puzzle Pin
Mike Dimmick5-Feb-07 5:27
Mike Dimmick5-Feb-07 5:27 
GeneralRe: 64-bit puzzle Pin
ricecake5-Feb-07 7:25
ricecake5-Feb-07 7:25 
GeneralRe: 64-bit puzzle Pin
cmk5-Feb-07 11:01
cmk5-Feb-07 11:01 
GeneralRe: 64-bit puzzle Pin
ricecake6-Feb-07 3:35
ricecake6-Feb-07 3:35 
QuestionHow to dock two dialogbars on right by top on bottom Pin
Member 37917193-Feb-07 3:57
Member 37917193-Feb-07 3:57 
AnswerRe: How to dock two dialogbars on right by top on bottom Pin
Mark Salsbery3-Feb-07 7:38
Mark Salsbery3-Feb-07 7:38 
QuestionImage library Pin
ceejeeb3-Feb-07 3:28
ceejeeb3-Feb-07 3:28 
AnswerRe: Image library Pin
Chris Losinger3-Feb-07 9:20
professionalChris Losinger3-Feb-07 9:20 
GeneralRe: Image library Pin
ceejeeb4-Feb-07 2:50
ceejeeb4-Feb-07 2:50 
QuestionHow can i scan all file in Some folder and check if they contain some string ? Pin
Yanshof3-Feb-07 3:22
Yanshof3-Feb-07 3:22 
AnswerRe: How can i scan all file in Some folder and check if they contain some string ? Pin
Waldermort3-Feb-07 3:51
Waldermort3-Feb-07 3:51 
QuestionRe: How can i scan all file in Some folder and check if they contain some string ? Pin
David Crow3-Feb-07 7:48
David Crow3-Feb-07 7:48 
AnswerRe: How can i scan all file in Some folder and check if they contain some string ? Pin
Waldermort3-Feb-07 9:10
Waldermort3-Feb-07 9:10 
AnswerRe: How can i scan all file in Some folder and check if they contain some string ? Pin
Hamid_RT3-Feb-07 5:54
Hamid_RT3-Feb-07 5:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.