When I'm calling a Dll method it sometimes throws an exception, and sometimes doesn't.
I'm calling it like this:
public class DllTest
{
[DllImport(@"MyDll.dll")]
public extern static string MyMethod(string someStringParam);
}
class Program
{
static void Main(string[] args)
{
DllTest.MyMethod("SomeString");
}
}
And the exception I get sometimes is this:
AccessViolationException
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Does anyone have any idea why I only get this exception sometimes? Why does it run smoothly sometimes?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)