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

C#

 
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 
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 
Hi,

two parameters using pointers, that is two potential problems. Try to split the job in halves, if you own the native code, experiment with a single parameter first.

For the struct pointer, I would opt for ref myStruct.

For the array of pointers, if the managed side does not NEED to know it is an array, just make it an IntPtr; if it must operate on array elements, the only easy way I know of is by:
- somehow knowing the element count (if need be, add another method to obtain it from the native world);
- then allocate the array on the managed side;
- then pass its pointer to the native world, which I prefer to handle with a GCHandle, GCHandleType.Pinned, AddrOfPinnedObject.

Conclusion: you may not even need unsafe code.

Smile | :)

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 
GeneralRe: associate file extension Pin
Jassim Rahma24-Mar-10 12:50
Jassim Rahma24-Mar-10 12:50 
GeneralRe: associate file extension Pin
Eslam Afifi24-Mar-10 13:47
Eslam Afifi24-Mar-10 13:47 

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.