Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: Serialization Pin
Keith Barrow25-Mar-10 1:01
professionalKeith Barrow25-Mar-10 1:01 
QuestionDynamically change Crystal Report Viewer source Pin
jamesc6924-Mar-10 23:13
jamesc6924-Mar-10 23:13 
AnswerRe: Dynamically change Crystal Report Viewer source Pin
Rajasekhar Reddy Adam24-Mar-10 23:39
Rajasekhar Reddy Adam24-Mar-10 23:39 
Questionaccessing C API from C# Pin
mavrick2324-Mar-10 21:22
mavrick2324-Mar-10 21:22 
AnswerRe: accessing C API from C# Pin
Calla24-Mar-10 21:45
Calla24-Mar-10 21:45 
AnswerRe: accessing C API from C# Pin
Richard MacCutchan24-Mar-10 22:54
mveRichard MacCutchan24-Mar-10 22:54 
GeneralRe: accessing C API from C# Pin
mavrick2324-Mar-10 23:57
mavrick2324-Mar-10 23:57 
AnswerRe: accessing C API from C# Pin
mavrick2324-Mar-10 23:12
mavrick2324-Mar-10 23:12 
Some more details :

'C' code :
-----------
int Init(myStruct* struct1, void** pHandle)
{
    <...some code...>
   *pHandle = sess_open(struct1, &session);
    <...some code...>
}



'C#' code :
-------------
Declaration:
--------------
[DllImport("My_C_Library.dll")]
public static extern int MY_CSHARP_INIT(myStruct* struct1, ref System.IntPtr[] Session_pp);



Implementation:
----------------
public int MY_CSHARP_INIT(myStruct* struct1, ref System.IntPtr[] Session_pp)
{
    int ret_val = Init(struct1, ref Session_pp);
}


-------------------------------------------------------------------------
This gives a Exception as "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
-------------------------------------------------------------------------

Any help appreciated.
GeneralRe: accessing C API from C# Pin
Richard MacCutchan25-Mar-10 2:14
mveRichard MacCutchan25-Mar-10 2:14 
GeneralRe: accessing C API from C# Pin
Luc Pattyn25-Mar-10 3:00
sitebuilderLuc Pattyn25-Mar-10 3:00 
Questionhow to empty textbox in a groupbox Pin
crisjala24-Mar-10 16:22
crisjala24-Mar-10 16:22 
AnswerRe: how to empty textbox in a groupbox Pin
Not Active24-Mar-10 16:23
mentorNot Active24-Mar-10 16:23 
AnswerRe: how to empty textbox in a groupbox Pin
Khaniya24-Mar-10 18:33
professionalKhaniya24-Mar-10 18:33 
GeneralRe: how to empty textbox in a groupbox Pin
crisjala24-Mar-10 20:47
crisjala24-Mar-10 20:47 
QuestionMessage Removed Pin
24-Mar-10 13:50
user20524-Mar-10 13:50 
AnswerRe: Event Pin
Luc Pattyn24-Mar-10 14:13
sitebuilderLuc Pattyn24-Mar-10 14:13 
AnswerRe: Event Pin
Not Active24-Mar-10 15:11
mentorNot Active24-Mar-10 15:11 
AnswerRe: Event Pin
PIEBALDconsult24-Mar-10 16:10
mvePIEBALDconsult24-Mar-10 16:10 
GeneralRe: Event Pin
#realJSOP25-Mar-10 0:00
mve#realJSOP25-Mar-10 0:00 
GeneralRe: Event Pin
PIEBALDconsult25-Mar-10 3:56
mvePIEBALDconsult25-Mar-10 3:56 
AnswerRe: Event Pin
#realJSOP25-Mar-10 0:01
mve#realJSOP25-Mar-10 0:01 
Questioncreate Microsoft report from XML Pin
Jassim Rahma24-Mar-10 13:17
Jassim Rahma24-Mar-10 13:17 
AnswerRe: create Microsoft report from XML Pin
Not Active24-Mar-10 15:09
mentorNot Active24-Mar-10 15:09 
Questionassociate file extension Pin
Jassim Rahma24-Mar-10 12:13
Jassim Rahma24-Mar-10 12:13 
AnswerRe: associate file extension Pin
Not Active24-Mar-10 12:45
mentorNot Active24-Mar-10 12:45 

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.