Click here to Skip to main content
15,886,362 members
Home / Discussions / C#
   

C#

 
QuestionPropertyGrid TypeConverter Pin
Dylan van Heerden16-Jan-06 4:06
Dylan van Heerden16-Jan-06 4:06 
AnswerRe: PropertyGrid TypeConverter Pin
joe carbone16-Jan-06 4:17
joe carbone16-Jan-06 4:17 
GeneralRe: PropertyGrid TypeConverter Pin
Dylan van Heerden16-Jan-06 4:20
Dylan van Heerden16-Jan-06 4:20 
GeneralRe: PropertyGrid TypeConverter Pin
joe carbone16-Jan-06 4:37
joe carbone16-Jan-06 4:37 
QuestionGDI+ Pin
usmanali12316-Jan-06 3:56
usmanali12316-Jan-06 3:56 
AnswerRe: GDI+ Pin
Andy Moore16-Jan-06 4:21
Andy Moore16-Jan-06 4:21 
AnswerRe: GDI+ Pin
Robert Rohde16-Jan-06 4:21
Robert Rohde16-Jan-06 4:21 
QuestionHow to marshal char** in struct? Pin
jurot16-Jan-06 3:49
jurot16-Jan-06 3:49 
Hi.

I have struct in C++:

struct MY_STRUCT
{
int x;
int y;
char** arrNames; //array of strings

}

I have function GetMyStruct, which gives me pointer to this struct, but
I can't get the array of strings (MY_STRUCT.arrNames).

MY_STRUCT* GetMyStruct();

In C# :

public struct MY_STRUCT
{
public int x;
public int y;
public string[] arrNames; //array of strings

}

public class MyWrapper
{
[DllImport("MyDll.dll")]
private static extern IntPtr GetMyStruct();
public static MY_STRUCT GetMyStructW()
{
IntPtr p = GetMyStruct();

return (MY_STRUCT) Marshal.PtrToStructure(p, typeof(MY_STRUCT));
}

}

BUT MyWrapper.GetMyStructW() doesn't work. Plllease help.

jurot
AnswerRe: How to marshal char** in struct? Pin
Andy Moore16-Jan-06 4:57
Andy Moore16-Jan-06 4:57 
GeneralRe: How to marshal char** in struct? Pin
jurot16-Jan-06 23:15
jurot16-Jan-06 23:15 
GeneralRe: How to marshal char** in struct? Pin
jurot17-Jan-06 1:06
jurot17-Jan-06 1:06 
GeneralRe: How to marshal char** in struct? Pin
Andy Moore17-Jan-06 11:25
Andy Moore17-Jan-06 11:25 
QuestionDataGrid formatting Pin
jeanchalumeau16-Jan-06 3:21
jeanchalumeau16-Jan-06 3:21 
AnswerRe: DataGrid formatting Pin
Robert Rohde16-Jan-06 4:18
Robert Rohde16-Jan-06 4:18 
GeneralRe: DataGrid formatting Pin
jeanchalumeau17-Jan-06 3:37
jeanchalumeau17-Jan-06 3:37 
QuestionChange file extensions Pin
GermanDM16-Jan-06 3:05
GermanDM16-Jan-06 3:05 
AnswerRe: Change file extensions Pin
Robert Rohde16-Jan-06 4:17
Robert Rohde16-Jan-06 4:17 
JokeRe: Change file extensions Pin
GermanDM16-Jan-06 19:36
GermanDM16-Jan-06 19:36 
GeneralRe: Change file extensions Pin
Robert Rohde16-Jan-06 19:49
Robert Rohde16-Jan-06 19:49 
GeneralRe: Change file extensions Pin
GermanDM16-Jan-06 19:55
GermanDM16-Jan-06 19:55 
QuestionVirtual Printer Driver! Pin
Andy H16-Jan-06 2:53
Andy H16-Jan-06 2:53 
AnswerRe: Virtual Printer Driver! Pin
John Fisher16-Jan-06 6:19
John Fisher16-Jan-06 6:19 
QuestionC# and WinFX Pin
Martin2316-Jan-06 1:52
Martin2316-Jan-06 1:52 
QuestionT-SQL vs. C# stored procedures Pin
Rob Philpott16-Jan-06 1:32
Rob Philpott16-Jan-06 1:32 
AnswerRe: T-SQL vs. C# stored procedures Pin
Colin Angus Mackay16-Jan-06 4:36
Colin Angus Mackay16-Jan-06 4:36 

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.