Click here to Skip to main content
15,914,066 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to clone a dialog Pin
David Crow15-Oct-07 3:18
David Crow15-Oct-07 3:18 
QuestionSnapshots via ToolHelp Pin
Richard Andrew x6414-Oct-07 10:46
professionalRichard Andrew x6414-Oct-07 10:46 
QuestionRe: Snapshots via ToolHelp Pin
David Crow14-Oct-07 17:09
David Crow14-Oct-07 17:09 
AnswerRe: Snapshots via ToolHelp Pin
Richard Andrew x6415-Oct-07 2:41
professionalRichard Andrew x6415-Oct-07 2:41 
QuestionSocket Connectioin via Proxy Pin
Ghasrfakhri14-Oct-07 8:31
Ghasrfakhri14-Oct-07 8:31 
AnswerRe: Socket Connectioin via Proxy Pin
Mike Dimmick14-Oct-07 9:40
Mike Dimmick14-Oct-07 9:40 
Questionbuild C++ COM for 64-bit platform Pin
George_George13-Oct-07 21:25
George_George13-Oct-07 21:25 
AnswerRe: build C++ COM for 64-bit platform Pin
Mike Dimmick14-Oct-07 10:00
Mike Dimmick14-Oct-07 10:00 
32-bit code will run on 64-bit platforms. However, 32-bit DLLs can only load into 32-bit processes and 64-bit code into 64-bit processes, you cannot mix them. A single build is impossible if you want your code to load into a 64-bit process.

Firstly you have to pick the sort of 64-bit platform you're supporting. Windows runs on two, x64 and Itanium. Itanium is very expensive and rare - commodity 64-bit platforms are x64. (If you can boot the 32-bit OS on it, it's x64.)

In Visual Studio 2005, go to Build/Configuration Manager. In the Active Solution Platform drop-list, select New. Then select 'x64' from the 'Type or select the new platform' drop-list. If it's not present you may need to re-run Visual Studio setup and install the x64 compiler toolchain. When you click OK, Visual Studio changes the active configuration to x64 and will use the x64 compiler to build your solution. To swap between the compilers, select the appropriate configuration from this dialog or use the equivalent drop-down list in the standard toolbar.

You may need to refine your build settings slightly. If you change them in future you will need to change them for both platforms, they are not copied between the two. You can do this manually or you can select All Platforms from the Platform drop-list in Project Properties.

If you're dealing with old code, you may have to change some datatypes, whenever dealing with a variable that can hold an integer or a pointer, or that is of a type that is supposed to be able to hold the complete range of pointer values, e.g. you may have used an int for the return value of strlen, whereas it should really be a size_t, which is 64 bits on 64-bit Windows. Other places to be aware of are in handling window messages - LPARAM and WPARAM extend to 64 bits (WPARAM remains unsigned while LPARAM remains signed) - and in the use of context parameters, which commonly change to DWORD_PTR to reflect that either a numeric value or a pointer is acceptable.

The 32-bit compiler generates 64-bit portability warnings if the /Wp64 switch is enabled, but reportedly this is not as extensive as actually using the 64-bit compiler itself. As always it's best practice to compile with a high warning level (level 4 if you can) and ensure that the code compiles with no warnings.


DoEvents: Generating unexpected recursion since 1991

GeneralRe: build C++ COM for 64-bit platform Pin
George_George14-Oct-07 20:32
George_George14-Oct-07 20:32 
GeneralRe: build C++ COM for 64-bit platform Pin
Mike Dimmick15-Oct-07 11:38
Mike Dimmick15-Oct-07 11:38 
GeneralRe: build C++ COM for 64-bit platform Pin
George_George15-Oct-07 22:49
George_George15-Oct-07 22:49 
Questionhow to include esc character in a string? Pin
ShilpaPotnis13-Oct-07 17:00
ShilpaPotnis13-Oct-07 17:00 
AnswerRe: how to include esc character in a string? Pin
Mark Salsbery13-Oct-07 17:14
Mark Salsbery13-Oct-07 17:14 
GeneralRe: how to include esc character in a string? Pin
ShilpaPotnis14-Oct-07 11:41
ShilpaPotnis14-Oct-07 11:41 
QuestionNeed the registry contents for VC6 files Pin
followait13-Oct-07 15:51
followait13-Oct-07 15:51 
AnswerRe: Need the registry contents for VC6 files Pin
Joan M14-Oct-07 7:15
professionalJoan M14-Oct-07 7:15 
GeneralRe: Need the registry contents for VC6 files Pin
followait15-Oct-07 18:39
followait15-Oct-07 18:39 
QuestionEntry Point for Executable Pin
Richard Andrew x6413-Oct-07 14:28
professionalRichard Andrew x6413-Oct-07 14:28 
AnswerRe: Entry Point for Executable Pin
Mark Salsbery13-Oct-07 17:38
Mark Salsbery13-Oct-07 17:38 
GeneralRe: Entry Point for Executable Pin
Richard Andrew x6414-Oct-07 5:56
professionalRichard Andrew x6414-Oct-07 5:56 
QuestionMessage Removed Pin
13-Oct-07 11:24
Armond Sarkisian13-Oct-07 11:24 
AnswerRe: C++ -- Help Pin
Mark Salsbery13-Oct-07 11:36
Mark Salsbery13-Oct-07 11:36 
QuestionProblem with code from msdn AddAccessRights [modified] Pin
selecta13-Oct-07 10:37
selecta13-Oct-07 10:37 
AnswerRe: Problem with code from msdn AddAccessRights Pin
Mike Dimmick14-Oct-07 10:34
Mike Dimmick14-Oct-07 10:34 
QuestionC++ Help Needed Pin
vivekphlp13-Oct-07 8:23
vivekphlp13-Oct-07 8:23 

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.