Click here to Skip to main content
15,892,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: INT_PTR Pin
toxcct27-May-05 0:51
toxcct27-May-05 0:51 
GeneralRe: INT_PTR Pin
ThatsAlok27-May-05 1:03
ThatsAlok27-May-05 1:03 
GeneralRe: INT_PTR Pin
toxcct27-May-05 1:05
toxcct27-May-05 1:05 
GeneralRe: INT_PTR Pin
Cedric Moonen27-May-05 1:06
Cedric Moonen27-May-05 1:06 
GeneralRe: INT_PTR Pin
ThatsAlok27-May-05 1:20
ThatsAlok27-May-05 1:20 
GeneralRe: INT_PTR Pin
toxcct27-May-05 1:30
toxcct27-May-05 1:30 
GeneralRe: INT_PTR Pin
Bob Stanneveld27-May-05 1:57
Bob Stanneveld27-May-05 1:57 
GeneralRe: INT_PTR Pin
Bob Stanneveld27-May-05 1:56
Bob Stanneveld27-May-05 1:56 
Hello,

an INT_PTR is NOT a pointer to an int! It is basically an int. If you compile under 32 bit, the INT_PTR is __int32, if you compile under 64 bit, it is an __int64. This is because the default size of an int is 64 bits on a 64 bit compiler instead of 32 bits.

The main advantage of the INT_PTR is that you get the same warnings when you ocompile under a 32 bit compiler as if you were compiling under a 64 bit compiler. This helps you to prepare to write portable code for the 64 bit platform.

If you are not planning to write portable code, you can simply ignore those warnings or #pragma them away:
<br />
#pragma warning(disable : /*warning number here: 4003*/)<br />


Hope this helps

Blog[^]
GeneralRe: INT_PTR Pin
ThatsAlok27-May-05 2:06
ThatsAlok27-May-05 2:06 
GeneralRe: INT_PTR Pin
Bob Stanneveld27-May-05 2:08
Bob Stanneveld27-May-05 2:08 
GeneralRe: INT_PTR Pin
ThatsAlok27-May-05 2:14
ThatsAlok27-May-05 2:14 
GeneralRe: INT_PTR Pin
Bob Stanneveld27-May-05 2:19
Bob Stanneveld27-May-05 2:19 
GeneralRe: INT_PTR Pin
Ryan Binns27-May-05 2:19
Ryan Binns27-May-05 2:19 
GeneralRe: INT_PTR Pin
Bob Stanneveld27-May-05 2:20
Bob Stanneveld27-May-05 2:20 
GeneralRe: INT_PTR Pin
Nemanja Trifunovic27-May-05 5:20
Nemanja Trifunovic27-May-05 5:20 
GeneralRe: INT_PTR Pin
Ryan Binns27-May-05 2:22
Ryan Binns27-May-05 2:22 
GeneralTo Overload strlen() Pin
Member 184878427-May-05 0:32
Member 184878427-May-05 0:32 
GeneralRe: To Overload strlen() Pin
Ryan Binns27-May-05 2:28
Ryan Binns27-May-05 2:28 
QuestionFile Copy Hook? Pin
Priyank Bolia26-May-05 23:55
Priyank Bolia26-May-05 23:55 
AnswerRe: File Copy Hook? Pin
vikramlinux27-May-05 1:11
vikramlinux27-May-05 1:11 
GeneralRe: File Copy Hook? Pin
Priyank Bolia27-May-05 1:25
Priyank Bolia27-May-05 1:25 
GeneralRe: File Copy Hook? Pin
John M. Drescher27-May-05 1:45
John M. Drescher27-May-05 1:45 
GeneralRe: File Copy Hook? Pin
ThatsAlok27-May-05 1:52
ThatsAlok27-May-05 1:52 
GeneralRe: File Copy Hook? Pin
John M. Drescher27-May-05 4:17
John M. Drescher27-May-05 4:17 
GeneralRe: File Copy Hook? Pin
ThatsAlok27-May-05 18:45
ThatsAlok27-May-05 18:45 

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.