Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multicast Delegates Event Driven Architecture is there a way? Pin
danielgmx6-Aug-08 11:50
danielgmx6-Aug-08 11:50 
QuestionC# & webservice on Multiple servers Pin
balu123456-Aug-08 6:26
balu123456-Aug-08 6:26 
AnswerRe: CP Member Ignore - Repost Pin
Abhijit Jana6-Aug-08 17:59
professionalAbhijit Jana6-Aug-08 17:59 
QuestionProblem with Date Validation Pin
Verghese6-Aug-08 6:16
Verghese6-Aug-08 6:16 
AnswerRe: Problem with Date Validation Pin
Guffa6-Aug-08 10:04
Guffa6-Aug-08 10:04 
GeneralRe: Problem with Date Validation Pin
Verghese6-Aug-08 10:54
Verghese6-Aug-08 10:54 
GeneralRe: Problem with Date Validation Pin
Kjetil Svendsen6-Aug-08 23:18
Kjetil Svendsen6-Aug-08 23:18 
Question.NET DLL fails when called from Excel by restricted user Pin
Vikram A Punathambekar6-Aug-08 5:43
Vikram A Punathambekar6-Aug-08 5:43 
AnswerRe: .NET DLL fails when called from Excel by restricted user Pin
vikas amin6-Aug-08 10:55
vikas amin6-Aug-08 10:55 
QuestionGetting bitmap data from System.Windows.Shapes object Pin
AmitDey6-Aug-08 5:43
AmitDey6-Aug-08 5:43 
AnswerRe: Getting bitmap data from System.Windows.Shapes object Pin
Mark Salsbery6-Aug-08 6:10
Mark Salsbery6-Aug-08 6:10 
GeneralRe: Getting bitmap data from System.Windows.Shapes object Pin
AmitDey6-Aug-08 6:30
AmitDey6-Aug-08 6:30 
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 

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.