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

C#

 
AnswerRe: C# use of varibale help Pin
sngbrdb7-Oct-09 8:23
professionalsngbrdb7-Oct-09 8:23 
Question2D Array Trim Pin
ksss_maheshece6-Oct-09 0:32
ksss_maheshece6-Oct-09 0:32 
AnswerRe: 2D Array Trim Pin
PIEBALDconsult6-Oct-09 4:54
mvePIEBALDconsult6-Oct-09 4:54 
Questionhide header and footer while printing a webpage in C# [modified] Pin
vasavi.p5-Oct-09 23:56
vasavi.p5-Oct-09 23:56 
GeneralRe: hide header and footer while printing a webpage in C# Pin
Rajesh Anuhya6-Oct-09 1:22
professionalRajesh Anuhya6-Oct-09 1:22 
GeneralRe: hide header and footer while printing a webpage in C# Pin
vasavi.p6-Oct-09 1:50
vasavi.p6-Oct-09 1:50 
GeneralRe: hide header and footer while printing a webpage in C# Pin
Eddy Vluggen6-Oct-09 8:35
professionalEddy Vluggen6-Oct-09 8:35 
Questionimport C char** to C# in a struct Pin
MCALLAN5-Oct-09 22:29
MCALLAN5-Oct-09 22:29 
Hi,

In C, i have:

typedef struct strct_Err
{
int iErr;
int iMsgCount;
char* pstructMsg[2048];
} StructErr;

StructErr foo();

C#: i have:

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public unsafe struct strct_Err
{
public int iErr;
public int iMsgCount;
IntPtr pstructMsg;
}

[DllImport(MY_DLL, CharSet = CharSet.Ansi)]
public static extern strct_Err foo();

When i execute this, it crashs.

If i disable all ref to pstructMsg in C and C#, it works then i suppose that i do not correctly import pstructMsg

Could you help me ?

What is the good way to import this struct with pstructMsg ?

Thanks you

Allan
AnswerRe: import C char** to C# in a struct Pin
Richard MacCutchan5-Oct-09 23:50
mveRichard MacCutchan5-Oct-09 23:50 
AnswerRe: import C char** to C# in a struct Pin
Pete O'Hanlon5-Oct-09 23:52
mvePete O'Hanlon5-Oct-09 23:52 
AnswerRe: import C char** to C# in a struct Pin
Daniel Grunwald6-Oct-09 2:47
Daniel Grunwald6-Oct-09 2:47 
AnswerRe: import C char** to C# in a struct Pin
Luc Pattyn6-Oct-09 4:57
sitebuilderLuc Pattyn6-Oct-09 4:57 
GeneralRe: import C char** to C# in a struct Pin
Richard MacCutchan6-Oct-09 6:05
mveRichard MacCutchan6-Oct-09 6:05 
GeneralRe: import C char** to C# in a struct Pin
Dan Neely6-Oct-09 7:14
Dan Neely6-Oct-09 7:14 
QuestionRight Click Menu Pin
AhmedMasum5-Oct-09 22:09
AhmedMasum5-Oct-09 22:09 
AnswerRe: Right Click Menu Pin
OriginalGriff5-Oct-09 22:40
mveOriginalGriff5-Oct-09 22:40 
GeneralRe: Right Click Menu Pin
AhmedMasum5-Oct-09 23:01
AhmedMasum5-Oct-09 23:01 
GeneralRe: Right Click Menu Pin
Mycroft Holmes5-Oct-09 23:15
professionalMycroft Holmes5-Oct-09 23:15 
GeneralRe: Right Click Menu Pin
Muammar©5-Oct-09 23:34
Muammar©5-Oct-09 23:34 
GeneralRe: Right Click Menu Pin
AhmedMasum6-Oct-09 17:44
AhmedMasum6-Oct-09 17:44 
GeneralRe: Right Click Menu Pin
Muammar©6-Oct-09 21:01
Muammar©6-Oct-09 21:01 
QuestionAbout listbox use in DatagridView in window application Pin
sanjay307845-Oct-09 21:34
sanjay307845-Oct-09 21:34 
AnswerRe: About listbox use in DatagridView in window application Pin
Richard MacCutchan5-Oct-09 23:58
mveRichard MacCutchan5-Oct-09 23:58 
QuestionHow to give Write permission for a Folder? Pin
MikeSharp5-Oct-09 19:29
MikeSharp5-Oct-09 19:29 
AnswerRe: How to give Write permission for a Folder? Pin
Calla5-Oct-09 21:59
Calla5-Oct-09 21:59 

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.