Click here to Skip to main content
15,868,292 members
Home / Discussions / C#
   

C#

 
GeneralRe: Getting bitmap data from System.Windows.Shapes object Pin
Mark Salsbery6-Aug-08 6:40
Mark Salsbery6-Aug-08 6:40 
GeneralRe: Getting bitmap data from System.Windows.Shapes object Pin
AmitDey6-Aug-08 6:47
AmitDey6-Aug-08 6:47 
GeneralRe: Getting bitmap data from System.Windows.Shapes object Pin
Mark Salsbery6-Aug-08 7:07
Mark Salsbery6-Aug-08 7:07 
GeneralRe: Getting bitmap data from System.Windows.Shapes object Pin
AmitDey6-Aug-08 7:17
AmitDey6-Aug-08 7:17 
GeneralRe: Getting bitmap data from System.Windows.Shapes object Pin
led mike6-Aug-08 7:26
led mike6-Aug-08 7:26 
QuestionAccessViolationException - mciGetErrorString - DllImport("winmm.dll") [modified] Pin
Steven D. Foster6-Aug-08 5:17
Steven D. Foster6-Aug-08 5:17 
AnswerRe: AccessViolationException - mciGetErrorString - DllImport("winmm.dll") Pin
Steven D. Foster6-Aug-08 5:56
Steven D. Foster6-Aug-08 5:56 
GeneralRe: AccessViolationException - mciGetErrorString - DllImport("winmm.dll") Pin
Jimmanuel6-Aug-08 9:16
Jimmanuel6-Aug-08 9:16 
I'm not an expert at making native calls but there are a few things that don't look right to me.

1) C# long is not necessarily the same as C/C++ long.
2) In mciGetErrorString param #3 represents the length of the buffer that param #2 points to, but you're passing in an empty string which is length zero and telling mciGetErrorString that it's 128 chars long. I think to return a string from native code to managed code you need to create a StringBuilder of the appropriate length and use that. In the article you linked to see how he used a StringBuilder for the variable strReturn in the declaration of mciSendString even though when he calls that function he passes null for the string pointer and zero for the length.

Hope that helps.





QuestionRe: AccessViolationException - mciGetErrorString - DllImport("winmm.dll") Pin
Steven D. Foster6-Aug-08 10:03
Steven D. Foster6-Aug-08 10:03 
AnswerRe: AccessViolationException - mciGetErrorString - DllImport("winmm.dll") Pin
Jimmanuel6-Aug-08 10:36
Jimmanuel6-Aug-08 10:36 
QuestionRe: AccessViolationException - mciGetErrorString - DllImport("winmm.dll") Pin
Steven D. Foster6-Aug-08 10:49
Steven D. Foster6-Aug-08 10:49 
AnswerRe: AccessViolationException - mciGetErrorString - DllImport("winmm.dll") Pin
Jimmanuel6-Aug-08 11:02
Jimmanuel6-Aug-08 11:02 
GeneralRe: AccessViolationException - mciGetErrorString - DllImport("winmm.dll") Pin
Steven D. Foster6-Aug-08 11:10
Steven D. Foster6-Aug-08 11:10 
AnswerRe: AccessViolationException - mciGetErrorString - DllImport("winmm.dll") Pin
Mark Salsbery6-Aug-08 9:38
Mark Salsbery6-Aug-08 9:38 
QuestionHow to trace my Application with Visual Studio? Pin
hdv2126-Aug-08 4:56
hdv2126-Aug-08 4:56 
QuestionI need a Word Viewer Pin
Laji596-Aug-08 4:33
Laji596-Aug-08 4:33 
AnswerRe: I need a Word Viewer Pin
Thomas Stockwell6-Aug-08 4:38
professionalThomas Stockwell6-Aug-08 4:38 
AnswerRe: I need a Word Viewer Pin
Paul Conrad6-Aug-08 5:18
professionalPaul Conrad6-Aug-08 5:18 
AnswerRe: I need a Word Viewer Pin
vikas amin6-Aug-08 8:50
vikas amin6-Aug-08 8:50 
GeneralRe: I need a Word Viewer Pin
vikas amin6-Aug-08 8:52
vikas amin6-Aug-08 8:52 
AnswerRe: I need a Word Viewer Pin
CezW6-Aug-08 9:50
CezW6-Aug-08 9:50 
QuestionVERY STRANGE! what is this regex problem? [modified] Pin
enginço6-Aug-08 4:23
enginço6-Aug-08 4:23 
AnswerRe: VERY STRANGE! what is this regex problem? [modified] Pin
enginço6-Aug-08 4:46
enginço6-Aug-08 4:46 
GeneralRe: VERY STRANGE! what is this regex problem? Pin
Guffa6-Aug-08 8:37
Guffa6-Aug-08 8:37 
QuestionLoad form in the background? Pin
Justin Time6-Aug-08 4:12
Justin Time6-Aug-08 4:12 

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.