Click here to Skip to main content
15,887,434 members
Home / Discussions / C#
   

C#

 
GeneralRe: Size of Color struct? Pin
DaveyM6914-Mar-09 4:09
professionalDaveyM6914-Mar-09 4:09 
GeneralRe: Size of Color struct? Pin
Luc Pattyn14-Mar-09 4:30
sitebuilderLuc Pattyn14-Mar-09 4:30 
GeneralRe: Size of Color struct? [modified] Pin
DaveyM6914-Mar-09 5:44
professionalDaveyM6914-Mar-09 5:44 
GeneralRe: Size of Color struct? Pin
DaveyM6914-Mar-09 6:11
professionalDaveyM6914-Mar-09 6:11 
GeneralRe: Size of Color struct? Pin
Luc Pattyn14-Mar-09 4:51
sitebuilderLuc Pattyn14-Mar-09 4:51 
AnswerRe: Size of Color struct? Pin
Luc Pattyn14-Mar-09 4:48
sitebuilderLuc Pattyn14-Mar-09 4:48 
GeneralRe: Size of Color struct? Pin
Xmen Real 14-Mar-09 5:48
professional Xmen Real 14-Mar-09 5:48 
GeneralRe: Size of Color struct? Pin
Luc Pattyn14-Mar-09 6:03
sitebuilderLuc Pattyn14-Mar-09 6:03 
Xmen wrote:
why string if its pointer. Pointers are suppose to be IntPtr or long.


On the functional level, it is a string. However strings are reference types, so what is actually sitting inside the struct and taking up some bytes, is just a 32 or 64-bit pointer/reference to the actual string. We ancients, with a pre-.NET background, call that a pointer.

When you need to pass a reference of something to the native world, the correct way is by using an IntPtr; a long would be wrong, and so would be an int. IntPtr adapts itself automatically to the Win32/Win64 situation at hand. Unfortunately the majority of P/Invoke examples on the web are still using int for passing pointers, and so they are plain wrong.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


GeneralRe: Size of Color struct? Pin
Xmen Real 14-Mar-09 6:10
professional Xmen Real 14-Mar-09 6:10 
GeneralRe: Size of Color struct? Pin
Luc Pattyn14-Mar-09 6:43
sitebuilderLuc Pattyn14-Mar-09 6:43 
QuestionHow to load the right Interop Assembly in runtime ? Pin
Yanshof14-Mar-09 2:34
Yanshof14-Mar-09 2:34 
QuestionGridview updation problem Pin
muhammadafsal14-Mar-09 1:52
muhammadafsal14-Mar-09 1:52 
AnswerRe: Gridview updation problem Pin
Blue_Boy14-Mar-09 2:33
Blue_Boy14-Mar-09 2:33 
QuestionIdle processing in windows forms Pin
saksp14-Mar-09 1:19
saksp14-Mar-09 1:19 
AnswerRe: Idle processing in windows forms Pin
dataminers14-Mar-09 1:41
dataminers14-Mar-09 1:41 
GeneralRe: Idle processing in windows forms Pin
saksp14-Mar-09 2:19
saksp14-Mar-09 2:19 
AnswerRe: Idle processing in windows forms Pin
Luc Pattyn14-Mar-09 3:13
sitebuilderLuc Pattyn14-Mar-09 3:13 
GeneralRe: Idle processing in windows forms Pin
#realJSOP14-Mar-09 3:33
mve#realJSOP14-Mar-09 3:33 
GeneralRe: Idle processing in windows forms Pin
Luc Pattyn14-Mar-09 3:59
sitebuilderLuc Pattyn14-Mar-09 3:59 
Questionbutton size srinks more in table layout panel Pin
Maddie from Dartford14-Mar-09 0:40
Maddie from Dartford14-Mar-09 0:40 
AnswerRe: button size srinks more in table layout panel Pin
fly90414-Mar-09 1:45
fly90414-Mar-09 1:45 
AnswerRe: button size srinks more in table layout panel Pin
Navneet Hegde14-Mar-09 2:29
Navneet Hegde14-Mar-09 2:29 
GeneralRe: button size srinks more in table layout panel Pin
Maddie from Dartford14-Mar-09 3:23
Maddie from Dartford14-Mar-09 3:23 
QuestionA class without Main Pin
Akash Chavhan14-Mar-09 0:03
Akash Chavhan14-Mar-09 0:03 
AnswerRe: A class without Main Pin
DaveyM6914-Mar-09 0:24
professionalDaveyM6914-Mar-09 0:24 

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.