Click here to Skip to main content
16,006,440 members
Home / Discussions / C#
   

C#

 
Generalwindows explorer type Treeview/Listview structure Pin
Inpreet Singh17-Mar-04 0:38
Inpreet Singh17-Mar-04 0:38 
GeneralRe: windows explorer type Treeview/Listview structure Pin
Heath Stewart17-Mar-04 5:37
protectorHeath Stewart17-Mar-04 5:37 
GeneralUpdate data in Grid on form1 from form2. Pin
Inpreet Singh16-Mar-04 23:55
Inpreet Singh16-Mar-04 23:55 
GeneralRe: Update data in Grid on form1 from form2. Pin
Heath Stewart17-Mar-04 5:33
protectorHeath Stewart17-Mar-04 5:33 
GeneralListView update Problem Pin
Snowjim16-Mar-04 23:55
Snowjim16-Mar-04 23:55 
GeneralRe: ListView update Problem Pin
Heath Stewart17-Mar-04 5:29
protectorHeath Stewart17-Mar-04 5:29 
GeneralSTGMEDIUM Union Layout Woes Pin
Tristan Rhodes16-Mar-04 22:03
Tristan Rhodes16-Mar-04 22:03 
GeneralRe: STGMEDIUM Union Layout Woes Pin
Heath Stewart17-Mar-04 4:51
protectorHeath Stewart17-Mar-04 4:51 
As I've explained before, and IntPtr is nothing more than a managed pointer. The number of digits is inconseqential. The pointer is a 32-bit memory address so it could have up to 10 digits in the number. How cares? It's still an address.

You have to get the string using the IntPtr. Once again, a string is nothing more than an array of characters, so this address points to the first character. The problem you're probably running into is handling ANSI and Unicode characters incorrectly. If you know the string will be ANSI, use Marshal.PtrToStringAnsi. Use Marshal.PtrToStringUni for Unicode and Marshal.PtrToStringBSTR for BSTRs (wide characters). If the character encoding is platform dependent, use Marshal.PtrToStringAuto. Note that the last will not automatically figure out what character encoding is in use; it will use ANSI for Windows and Unicode for Windows NT.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: STGMEDIUM Union Layout Woes Pin
Tristan Rhodes17-Mar-04 5:18
Tristan Rhodes17-Mar-04 5:18 
GeneralRe: STGMEDIUM Union Layout Woes Pin
Tristan Rhodes17-Mar-04 5:47
Tristan Rhodes17-Mar-04 5:47 
QuestionHow to use class in Web Service Pin
boat2002w16-Mar-04 22:01
boat2002w16-Mar-04 22:01 
AnswerRe: How to use class in Web Service Pin
Mazdak16-Mar-04 22:17
Mazdak16-Mar-04 22:17 
GeneralRe: How to use class in Web Service Pin
boat2002w16-Mar-04 22:30
boat2002w16-Mar-04 22:30 
GeneralRe: How to use class in Web Service Pin
Mazdak17-Mar-04 3:26
Mazdak17-Mar-04 3:26 
AnswerRe: How to use class in Web Service Pin
Michael Flanakin17-Mar-04 18:44
Michael Flanakin17-Mar-04 18:44 
GeneralEasy Arithmetic question Pin
northernlights16-Mar-04 21:02
northernlights16-Mar-04 21:02 
GeneralRe: Easy Arithmetic question Pin
Colin Angus Mackay16-Mar-04 22:48
Colin Angus Mackay16-Mar-04 22:48 
GeneralRe: Easy Arithmetic question Pin
northernlights16-Mar-04 23:49
northernlights16-Mar-04 23:49 
GeneralRe: Easy Arithmetic question Pin
Chris Meech17-Mar-04 4:05
Chris Meech17-Mar-04 4:05 
GeneralRe: Easy Arithmetic question Pin
Manster17-Mar-04 4:39
Manster17-Mar-04 4:39 
GeneralRe: Easy Arithmetic question Pin
HAHAHA_NEXT17-Mar-04 10:51
HAHAHA_NEXT17-Mar-04 10:51 
GeneralRe: Easy Arithmetic question Pin
northernlights21-Mar-04 21:00
northernlights21-Mar-04 21:00 
QuestionHow to create text file for Resource file Pin
Inpreet Singh16-Mar-04 20:48
Inpreet Singh16-Mar-04 20:48 
AnswerRe: How to create text file for Resource file Pin
Heath Stewart17-Mar-04 4:43
protectorHeath Stewart17-Mar-04 4:43 
GeneralQuestion on non-rectangular form Pin
Flack16-Mar-04 19:19
Flack16-Mar-04 19:19 

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.