Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
AnswerRe: Polymorphism PinPopular
led mike21-Aug-08 8:40
led mike21-Aug-08 8:40 
QuestionHow do I change the datagrid.readonly property at run time Pin
krissree21-Aug-08 4:51
krissree21-Aug-08 4:51 
AnswerRe: How do I change the datagrid.readonly property at run time Pin
dan!sh 21-Aug-08 5:15
professional dan!sh 21-Aug-08 5:15 
AnswerRe: How do I change the datagrid.readonly property at run time Pin
Manas Bhardwaj21-Aug-08 5:23
professionalManas Bhardwaj21-Aug-08 5:23 
AnswerRe: How do I change the datagrid.readonly property at run time Pin
Dan Neely21-Aug-08 10:43
Dan Neely21-Aug-08 10:43 
QuestionHow do I change the datagrid.readonly property at run time Pin
krissree21-Aug-08 4:50
krissree21-Aug-08 4:50 
AnswerRe: How do I change the datagrid.readonly property at run time Pin
Yusuf21-Aug-08 8:32
Yusuf21-Aug-08 8:32 
Questionref a struct in a DLLImport function Pin
indogerman21-Aug-08 4:48
indogerman21-Aug-08 4:48 
Hi Guys,

Im stuck in a weird problem, and hope the experts here can help me.

I have a C# VS2005 project. I call a Borland C DLL in it, using:
System.Runtime.InteropServices.DllImport(......

to get a function 'GetSearchResults' from the DLL like this:

int Result = Module1.GetSearchResults (handle, ref DeviceInfo, 1);

Module1: an internal sealed class where the DLLImport is done and device_info_t is declared.
DeviceInfo: is a object of a structure called device_info_t . I am supposed to get the Search-Result back in this structure.


The C function looks like this:
int GetSearchResults(const handle_t handle, device_info_t results[], const size_t count);


Now, when I run this code, I get a 'System.AccessViolationException', saying 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt'.

Does anyone have an idea, whats happening, whats causing this error?

Thank you soo much guys... Smile | :)
AnswerRe: ref a struct in a DLLImport function Pin
led mike21-Aug-08 5:09
led mike21-Aug-08 5:09 
AnswerRe: ref a struct in a DLLImport function Pin
oobimoo21-Aug-08 7:12
oobimoo21-Aug-08 7:12 
AnswerRe: ref a struct in a DLLImport function Pin
Gideon Engelberth21-Aug-08 17:19
Gideon Engelberth21-Aug-08 17:19 
GeneralRe: ref a struct in a DLLImport function Pin
indogerman24-Aug-08 21:58
indogerman24-Aug-08 21:58 
GeneralRe: ref a struct in a DLLImport function Pin
Gideon Engelberth25-Aug-08 2:35
Gideon Engelberth25-Aug-08 2:35 
QuestionHow to Use DataSet in C# Pin
mghiassi21-Aug-08 4:26
mghiassi21-Aug-08 4:26 
AnswerRe: How to Use DataSet in C# Pin
Manas Bhardwaj21-Aug-08 4:37
professionalManas Bhardwaj21-Aug-08 4:37 
GeneralRe: How to Use DataSet in C# Pin
mghiassi21-Aug-08 4:51
mghiassi21-Aug-08 4:51 
GeneralRe: How to Use DataSet in C# Pin
led mike21-Aug-08 5:05
led mike21-Aug-08 5:05 
AnswerRe: How to Use DataSet in C# Pin
PIEBALDconsult21-Aug-08 4:39
mvePIEBALDconsult21-Aug-08 4:39 
Question[Message Deleted] Pin
subramanyeswari21-Aug-08 2:35
subramanyeswari21-Aug-08 2:35 
AnswerRe: reading dat file Pin
lisan_al_ghaib21-Aug-08 2:41
lisan_al_ghaib21-Aug-08 2:41 
QuestionUDP an C# Pin
Stephen Lintott21-Aug-08 2:33
Stephen Lintott21-Aug-08 2:33 
AnswerRe: UDP an C# Pin
leppie21-Aug-08 2:48
leppie21-Aug-08 2:48 
GeneralRe: UDP an C# Pin
Stephen Lintott21-Aug-08 2:52
Stephen Lintott21-Aug-08 2:52 
GeneralRe: UDP an C# Pin
leppie21-Aug-08 3:10
leppie21-Aug-08 3:10 
GeneralRe: UDP an C# Pin
Stephen Lintott21-Aug-08 3:12
Stephen Lintott21-Aug-08 3: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.