Click here to Skip to main content
15,883,809 members
Home / Discussions / C#
   

C#

 
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 
Hello, I'm receiving the following error message. I know I'm missing something simple, but I can't figure out what it is.
Possibly a local DLL security issue? I have been able to reference winmm.dll 's other methods without a problem though.

The only thing I can think of is I'm sending invalid Types.
Tested in VS 2005 (.NET 2.0), and C# Express 2008 (.NET 3.5)

Thanks for any help anyone can provide.


Microsoft's Documentation of mciGetErrorString...
http://msdn.microsoft.com/en-us/library/ms709479(VS.85).aspx[^]


Error Message...
AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.


Code...
class Program
{
    [System.Runtime.InteropServices.DllImport("winmm.dll")]
    private static extern bool mciGetErrorString(long errorCode, string buffer, int iReturnLength);

    static void Main(string[] args)
    {
        long error = 19703256959680778;

        string text = "";

        mciGetErrorString(error, text, 128);
    }
}


modified on Wednesday, August 6, 2008 11:28 AM

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 
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 

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.