Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: c++ win32 CreateThread, Wait, final testing Pin
Albert Holguin1-May-12 3:46
professionalAlbert Holguin1-May-12 3:46 
GeneralRe: c++ win32 CreateThread, Wait, final testing Pin
jkirkerx1-May-12 6:59
professionaljkirkerx1-May-12 6:59 
AnswerRe: c++ win32 CreateThread, Wait, final testing Pin
Albert Holguin2-May-12 5:35
professionalAlbert Holguin2-May-12 5:35 
AnswerI've traced it down to this Pin
jkirkerx1-May-12 13:55
professionaljkirkerx1-May-12 13:55 
GeneralSolved Now Pin
jkirkerx1-May-12 17:35
professionaljkirkerx1-May-12 17:35 
AnswerRe: Solved Now Pin
Albert Holguin1-May-12 18:22
professionalAlbert Holguin1-May-12 18:22 
GeneralRe: Solved Now Pin
jkirkerx1-May-12 18:33
professionaljkirkerx1-May-12 18:33 
GeneralRe: Solved Now Pin
Albert Holguin2-May-12 5:36
professionalAlbert Holguin2-May-12 5:36 
Question[Win32 C++] VirtualFreeEx() error after WriteProcessMemory() success. But not always. Pin
_Kel_30-Apr-12 12:24
_Kel_30-Apr-12 12:24 
AnswerRe: [Win32 C++] VirtualFreeEx() error after WriteProcessMemory() success. But not always. Pin
Richard Andrew x6430-Apr-12 12:54
professionalRichard Andrew x6430-Apr-12 12:54 
GeneralRe: [Win32 C++] VirtualFreeEx() error after WriteProcessMemory() success. But not always. Pin
_Kel_30-Apr-12 13:18
_Kel_30-Apr-12 13:18 
GeneralRe: [Win32 C++] VirtualFreeEx() error after WriteProcessMemory() success. But not always. Pin
Richard Andrew x6430-Apr-12 13:22
professionalRichard Andrew x6430-Apr-12 13:22 
GeneralRe: [Win32 C++] VirtualFreeEx() error after WriteProcessMemory() success. But not always. Pin
_Kel_30-Apr-12 14:30
_Kel_30-Apr-12 14:30 
GeneralRe: [Win32 C++] VirtualFreeEx() error after WriteProcessMemory() success. But not always. Pin
Richard Andrew x6430-Apr-12 14:43
professionalRichard Andrew x6430-Apr-12 14:43 
QuestionOnInitDialog? Pin
Le Quang Long30-Apr-12 4:38
Le Quang Long30-Apr-12 4:38 
AnswerRe: OnInitDialog? Pin
Maximilien30-Apr-12 5:03
Maximilien30-Apr-12 5:03 
GeneralRe: OnInitDialog? Pin
Le Quang Long30-Apr-12 6:20
Le Quang Long30-Apr-12 6:20 
QuestionRe: OnInitDialog? Pin
David Crow30-Apr-12 6:07
David Crow30-Apr-12 6:07 
AnswerRe: OnInitDialog? Pin
Le Quang Long30-Apr-12 14:11
Le Quang Long30-Apr-12 14:11 
QuestionRestrict Copy and Paste Pin
john563229-Apr-12 18:35
john563229-Apr-12 18:35 
AnswerRe: Restrict Copy and Paste Pin
_AnsHUMAN_ 29-Apr-12 22:29
_AnsHUMAN_ 29-Apr-12 22:29 
AnswerRe: Restrict Copy and Paste Pin
JohnCz2-May-12 11:09
JohnCz2-May-12 11:09 
QuestionHow to setup the project settings when create an x64 project in cs2008? Pin
SAMZCN29-Apr-12 17:27
SAMZCN29-Apr-12 17:27 
AnswerRe: How to setup the project settings when create an x64 project in cs2008? Pin
Lakamraju Raghuram29-Apr-12 17:56
Lakamraju Raghuram29-Apr-12 17:56 
GeneralRe: How to setup the project settings when create an x64 project in cs2008? Pin
SAMZCN30-Apr-12 1:06
SAMZCN30-Apr-12 1:06 
Some marcos like WIN32/_WIN32 and WIN64/_WIN64 are used by VC++. I am not sure what's the difference between WIN32/WIN64 and _WIN32/_WIN64.
Lakamraju Raghuram wrote:
I think you have't fully understood that article.

When you are copying win32 settings to x64, that article clearly mentioned to change win32 switch to win64 for /D switch

Refering to the artical, the WIN32 macro should be repalced by WIN64 with /D switch support. But after I did it under the steps, the WIN32 macro still there but not replaced by WIN64. You may try it from your side. So I am confused by the result.I wonder if it is a defect of vs2008 IDE. Some other articals mentioned that the WIN32 macro always should be set with /D switch and with WIN64 macro definied for x64 application perspectively.

Lakamraju Raghuram wrote:
Which source code? your code or in any of the standard headers?

If it is yours, then you should take care to propely to map these settings to win32 and win64 pre-processor definitions

I found the _WIN64 macro in MFC header file of basestd.h. Here a code snap:
C++
#if defined(_WIN64)
    typedef __int64 INT_PTR, *PINT_PTR;
    typedef unsigned __int64 UINT_PTR, *PUINT_PTR;

    typedef __int64 LONG_PTR, *PLONG_PTR;
    typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;

    #define __int3264   __int64

#else
    typedef _W64 int INT_PTR, *PINT_PTR;
    typedef _W64 unsigned int UINT_PTR, *PUINT_PTR;

    typedef _W64 long LONG_PTR, *PLONG_PTR;
    typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;

    #define __int3264   __int32

#endif

So I am not sure which macro I should set in the preprocessor definition setting. By default, VS2008 IDE set the WIN32 macro with /D switch. Also I found _WIN32 macro is used in the MFC header files and source files.

modified 30-Apr-12 7:27am.

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.