Click here to Skip to main content
15,924,507 members
Home / Discussions / C#
   

C#

 
GeneralRe: byte[] cast to a string Pin
Tym!30-Oct-03 12:41
Tym!30-Oct-03 12:41 
Well, that is not necessarily my ultimate solution, but I have gotten runtime errors when trying to pass the data as arrays. I may be able to, but I can't quite get everything right.

I chose a string at first because it is in a struct that mimics an unmanaged struct and the original, unmanaged struct defines it as a string. The whole struct is then passed by reference in an interop call to a windows API function. When I use a string, the code runs, but the data in the string is incorrect and I get incorrect results.

When I have used byte[] or char[] or even StringBuilder, I got runtime errors, saying the struct cannot converted to unmanaged.... the size cannot be determined.

I might be able to do it both ways, I just need to figure out what I'm missing...Cry | :((
GeneralRe: byte[] cast to a string Pin
Jörgen Sigvardsson30-Oct-03 12:45
Jörgen Sigvardsson30-Oct-03 12:45 
GeneralRe: byte[] cast to a string Pin
Blake Coverett30-Oct-03 11:35
Blake Coverett30-Oct-03 11:35 
GeneralRe: byte[] cast to a string Pin
Tym!30-Oct-03 12:33
Tym!30-Oct-03 12:33 
GeneralRe: byte[] cast to a string Pin
Jeff Varszegi30-Oct-03 13:11
professionalJeff Varszegi30-Oct-03 13:11 
GeneralRe: byte[] cast to a string Pin
leppie30-Oct-03 14:29
leppie30-Oct-03 14:29 
GeneralRe: byte[] cast to a string Pin
Tym!3-Nov-03 6:30
Tym!3-Nov-03 6:30 
Generalput codes into an event! Pin
Silly Boy30-Oct-03 6:19
Silly Boy30-Oct-03 6:19 
GeneralRe: put codes into an event! Pin
Heath Stewart30-Oct-03 9:09
protectorHeath Stewart30-Oct-03 9:09 
GeneralRe: put codes into an event! Pin
Judah Gabriel Himango30-Oct-03 9:12
sponsorJudah Gabriel Himango30-Oct-03 9:12 
GeneralRe: put codes into an event! Pin
Heath Stewart30-Oct-03 9:25
protectorHeath Stewart30-Oct-03 9:25 
GeneralRe: put codes into an event! Pin
Nick Parker30-Oct-03 13:28
protectorNick Parker30-Oct-03 13:28 
GeneralMoving a control Pin
mcgahanfl30-Oct-03 5:46
mcgahanfl30-Oct-03 5:46 
GeneralRe: Moving a control Pin
Mike Ellison30-Oct-03 6:21
Mike Ellison30-Oct-03 6:21 
GeneralRe: Moving a control Pin
mcgahanfl30-Oct-03 6:54
mcgahanfl30-Oct-03 6:54 
Generalpassing the datatable as a parameter 2 the SP Pin
venubabu30-Oct-03 3:26
venubabu30-Oct-03 3:26 
GeneralRe: passing the datatable as a parameter 2 the SP Pin
Paul Watson30-Oct-03 3:54
sitebuilderPaul Watson30-Oct-03 3:54 
GeneralLaunch a programm from an application Pin
Matthieu.C29-Oct-03 22:31
Matthieu.C29-Oct-03 22:31 
GeneralRe: Launch a programm from an application Pin
Corinna John30-Oct-03 2:37
Corinna John30-Oct-03 2:37 
QuestionRichTextBox?? Pin
electronicm29-Oct-03 21:38
electronicm29-Oct-03 21:38 
AnswerRe: RichTextBox?? Pin
Mazdak30-Oct-03 5:43
Mazdak30-Oct-03 5:43 
GeneralRe: RichTextBox?? Pin
Judah Gabriel Himango30-Oct-03 9:15
sponsorJudah Gabriel Himango30-Oct-03 9:15 
QuestionHow to beautify Progress Bar? Pin
softair29-Oct-03 21:19
softair29-Oct-03 21:19 
AnswerRe: How to beautify Progress Bar? Pin
Heath Stewart30-Oct-03 3:00
protectorHeath Stewart30-Oct-03 3:00 
GeneralProblems on NiceMenu Pin
softair29-Oct-03 21:10
softair29-Oct-03 21:10 

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.