Click here to Skip to main content
15,920,632 members
Home / Discussions / C#
   

C#

 
QuestionGZipStream for compact framework 2.0 Pin
wajih.boukaram4-Nov-06 8:59
wajih.boukaram4-Nov-06 8:59 
AnswerRe: GZipStream for compact framework 2.0 Pin
Suelinda_W15-Dec-06 8:11
Suelinda_W15-Dec-06 8:11 
QuestionHow to get IWMHeaderInfo3 interface from WMEncoder Pin
Hemant kulkarni4-Nov-06 8:34
Hemant kulkarni4-Nov-06 8:34 
QuestionValidating XML Schema Pin
RichardInToronto4-Nov-06 7:20
RichardInToronto4-Nov-06 7:20 
AnswerRe: Validating XML Schema Pin
Stefan Troschuetz4-Nov-06 22:38
Stefan Troschuetz4-Nov-06 22:38 
GeneralRe: Validating XML Schema Pin
RichardInToronto6-Nov-06 7:03
RichardInToronto6-Nov-06 7:03 
Questionhow to convert char[] to System.IntPtr Pin
Hemant kulkarni4-Nov-06 6:01
Hemant kulkarni4-Nov-06 6:01 
AnswerRe: how to convert char[] to System.IntPtr Pin
Guffa4-Nov-06 6:39
Guffa4-Nov-06 6:39 
You can't convert a char array to an IntPtr. An IntPtr is just a pointer in a form that can be handled by managed code.

What your code is currently doing is trying to copy the data from the array to the memory area that the pointer is pointing to. As you haven't allocated any memory area and made the IntPtr point to it, that is impossible.

What you have to do is to get a pinned memory area, either by allocating unmanaged memory and copy the data to it, or by pinning the dataarray, and make the IntPtr point to the memory area.


---
b { font-weight: normal; }

GeneralRe: how to convert char[] to System.IntPtr Pin
Hemant kulkarni4-Nov-06 7:16
Hemant kulkarni4-Nov-06 7:16 
GeneralRe: how to convert char[] to System.IntPtr Pin
Guffa4-Nov-06 7:51
Guffa4-Nov-06 7:51 
Questionrichtextbox Pin
ammoh4-Nov-06 5:24
ammoh4-Nov-06 5:24 
AnswerRe: richtextbox Pin
Judah Gabriel Himango4-Nov-06 8:46
sponsorJudah Gabriel Himango4-Nov-06 8:46 
QuestionSelected text in datagrid cell not refreshing [modified] Pin
coachDon4-Nov-06 4:58
coachDon4-Nov-06 4:58 
Questionhair stylist software Pin
samreengr84-Nov-06 4:17
samreengr84-Nov-06 4:17 
AnswerRe: hair stylist software Pin
User 66584-Nov-06 4:25
User 66584-Nov-06 4:25 
GeneralRe: hair stylist software Pin
samreengr84-Nov-06 4:46
samreengr84-Nov-06 4:46 
GeneralRe: hair stylist software Pin
mav.northwind4-Nov-06 5:17
mav.northwind4-Nov-06 5:17 
JokeRe: hair stylist software Pin
likefood4-Nov-06 18:49
likefood4-Nov-06 18:49 
GeneralRe: hair stylist software Pin
User 66585-Nov-06 1:34
User 66585-Nov-06 1:34 
GeneralRe: hair stylist software Pin
Guffa4-Nov-06 5:49
Guffa4-Nov-06 5:49 
JokeRe: hair stylist software Pin
Colin Angus Mackay4-Nov-06 12:15
Colin Angus Mackay4-Nov-06 12:15 
GeneralRe: hair stylist software Pin
Colin Angus Mackay5-Nov-06 0:24
Colin Angus Mackay5-Nov-06 0:24 
AnswerRe: hair stylist software Pin
Amar Chaudhary4-Nov-06 7:36
Amar Chaudhary4-Nov-06 7:36 
AnswerRe: hair stylist software Pin
Amar Chaudhary4-Nov-06 8:37
Amar Chaudhary4-Nov-06 8:37 
GeneralRe: hair stylist software Pin
samreengr86-Nov-06 3:38
samreengr86-Nov-06 3:38 

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.