Click here to Skip to main content
15,889,211 members
Home / Discussions / C#
   

C#

 
Questioncan you help me Pin
sweet_memory30-Jun-10 1:01
sweet_memory30-Jun-10 1:01 
AnswerRe: can you help me PinPopular
OriginalGriff30-Jun-10 1:14
mveOriginalGriff30-Jun-10 1:14 
AnswerRe: can you help me Pin
sweet_memory30-Jun-10 11:23
sweet_memory30-Jun-10 11:23 
GeneralRe: can you help me Pin
OriginalGriff1-Jul-10 0:53
mveOriginalGriff1-Jul-10 0:53 
AnswerRe: can you help me Pin
I Believe In GOD30-Jun-10 8:52
I Believe In GOD30-Jun-10 8:52 
AnswerRe: can you help me Pin
yu-jian30-Jun-10 18:23
yu-jian30-Jun-10 18:23 
QuestionHow to convert DataTable to MSDATASRC? Pin
vineesh v30-Jun-10 0:29
vineesh v30-Jun-10 0:29 
QuestionHow to invoke native MyFunction(MyStruct* myStructs, unsigned int nMyStructs) from C#? Pin
Chesnokov Yuriy29-Jun-10 22:39
professionalChesnokov Yuriy29-Jun-10 22:39 
These are some C# class members:

[StructLayout(LayoutKind.Sequential)]
unsafe struct MyStruct 
{
public int size;
public byte* data;
}

//...

[DllImport("MyStruct.dll", CharSet = CharSet.Unicode)]
static extern unsafe void MyFunction(MyStruct* myStructs, unsigned int nMyStructs);


How to create such array of MyStruct in C# as in C to pass it to MyFunction from C#?

//C version
unsigned int N = 10;
MyStruct* pMyStructs = (MyStruct*)malloc(N * sizeof(MyStruct));
//for i=1:N allocate pMyStruct[i].data with malloc, put some byte data where
MyFunction(pMyStructs, N);


//C# version?
//How to allocate and fill those entries from managed byte[] arrays?


Чесноков

AnswerRe: How to invoke native MyFunction(MyStruct* myStructs, unsigned int nMyStructs) from C#? Pin
freakyit1-Jul-10 4:50
freakyit1-Jul-10 4:50 
AnswerRe: How to invoke native MyFunction(MyStruct* myStructs, unsigned int nMyStructs) from C#? Pin
Daniel Grunwald2-Jul-10 0:24
Daniel Grunwald2-Jul-10 0:24 
Questionbluetooth transfer issue Pin
Sajjad Izadi29-Jun-10 21:23
Sajjad Izadi29-Jun-10 21:23 
AnswerRe: bluetooth transfer issue Pin
Giorgi Dalakishvili30-Jun-10 2:57
mentorGiorgi Dalakishvili30-Jun-10 2:57 
Questionpicture box in win forms Pin
vamsi.ramesh00729-Jun-10 20:13
vamsi.ramesh00729-Jun-10 20:13 
AnswerRe: picture box in win forms Pin
Abhinav S29-Jun-10 20:56
Abhinav S29-Jun-10 20:56 
QuestionChanging control rectangle color? Pin
Megidolaon29-Jun-10 13:22
Megidolaon29-Jun-10 13:22 
AnswerRe: Changing control rectangle color? Pin
Adam R Harris29-Jun-10 13:48
Adam R Harris29-Jun-10 13:48 
AnswerRe: Changing control rectangle color? Pin
Ravi Bhavnani29-Jun-10 13:59
professionalRavi Bhavnani29-Jun-10 13:59 
AnswerRe: Changing control rectangle color? Pin
Dr.Walt Fair, PE29-Jun-10 14:07
professionalDr.Walt Fair, PE29-Jun-10 14:07 
AnswerRe: Changing control rectangle color? Pin
V.29-Jun-10 21:15
professionalV.29-Jun-10 21:15 
AnswerRe: Changing control rectangle color? Pin
Megidolaon30-Jun-10 12:21
Megidolaon30-Jun-10 12:21 
GeneralRe: Changing control rectangle color? Pin
Adam R Harris2-Jul-10 7:14
Adam R Harris2-Jul-10 7:14 
Questionc sharp learning Pin
netJP12L29-Jun-10 11:24
netJP12L29-Jun-10 11:24 
AnswerRe: c sharp learning Pin
Dave Kreskowiak30-Jun-10 1:38
mveDave Kreskowiak30-Jun-10 1:38 
Questioncan I make zooming in the form itself ? Pin
Honeyboy_2029-Jun-10 8:54
Honeyboy_2029-Jun-10 8:54 
AnswerRe: can I make zooming in the form itself ? Pin
Ennis Ray Lynch, Jr.29-Jun-10 9:20
Ennis Ray Lynch, Jr.29-Jun-10 9:20 

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.