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

C#

 
GeneralRe: Most efficient Collection? Pin
Luc Pattyn13-Jan-11 13:23
sitebuilderLuc Pattyn13-Jan-11 13:23 
AnswerRe: Most efficient Collection? Pin
jschell14-Jan-11 10:09
jschell14-Jan-11 10:09 
QuestionHaving trouble writing to an excel file Pin
turbosupramk313-Jan-11 9:40
turbosupramk313-Jan-11 9:40 
AnswerRe: Having trouble writing to an excel file Pin
Dalek Dave13-Jan-11 10:31
professionalDalek Dave13-Jan-11 10:31 
QuestionDuplicate media player winodw Pin
polycom12313-Jan-11 8:25
polycom12313-Jan-11 8:25 
QuestionHow Do I get IME to open my custom IME UI Windows in C# [modified] Pin
greg ofiesh13-Jan-11 7:48
greg ofiesh13-Jan-11 7:48 
QuestionCalling C++ Image API from C# Pin
econner13-Jan-11 4:59
econner13-Jan-11 4:59 
AnswerRe: Calling C++ Image API from C# Pin
_Erik_13-Jan-11 5:16
_Erik_13-Jan-11 5:16 
At a first glance, this is what I would do:

Declare MY_IMAGE as a class, not as a struct; use LayoutKind.Sequential instead of Explicit; remove FieldOffset attributes; do not use MarshalAs for pbuf field (pbuf should be an IntPtr); import the function without the ref keywords.

To assign the value to pbuf field you need to have the bytes in a byte[] array. Then you just have to set pbuf to the address of that array, using Marshal.UnsafeAddrOfPinnedArrayElement method.
GeneralRe: Calling C++ Image API from C# Pin
econner13-Jan-11 6:00
econner13-Jan-11 6:00 
GeneralRe: Calling C++ Image API from C# Pin
_Erik_13-Jan-11 6:10
_Erik_13-Jan-11 6:10 
GeneralRe: Calling C++ Image API from C# Pin
econner13-Jan-11 6:16
econner13-Jan-11 6:16 
GeneralRe: Calling C++ Image API from C# Pin
_Erik_13-Jan-11 6:47
_Erik_13-Jan-11 6:47 
GeneralRe: Calling C++ Image API from C# Pin
econner13-Jan-11 6:49
econner13-Jan-11 6:49 
GeneralRe: Calling C++ Image API from C# Pin
_Erik_13-Jan-11 6:55
_Erik_13-Jan-11 6:55 
GeneralRe: Calling C++ Image API from C# Pin
econner13-Jan-11 13:38
econner13-Jan-11 13:38 
GeneralRe: Calling C++ Image API from C# Pin
_Erik_14-Jan-11 1:51
_Erik_14-Jan-11 1:51 
GeneralRe: Calling C++ Image API from C# Pin
econner14-Jan-11 9:12
econner14-Jan-11 9:12 
GeneralRe: Calling C++ Image API from C# Pin
_Erik_14-Jan-11 10:22
_Erik_14-Jan-11 10:22 
GeneralRe: Calling C++ Image API from C# Pin
econner14-Jan-11 11:38
econner14-Jan-11 11:38 
GeneralRe: Calling C++ Image API from C# Pin
econner14-Jan-11 12:07
econner14-Jan-11 12:07 
GeneralRe: Calling C++ Image API from C# Pin
econner14-Jan-11 12:30
econner14-Jan-11 12:30 
GeneralRe: Calling C++ Image API from C# Pin
econner15-Jan-11 5:16
econner15-Jan-11 5:16 
GeneralRe: Calling C++ Image API from C# Pin
_Erik_17-Jan-11 2:32
_Erik_17-Jan-11 2:32 
AnswerRe: Calling C++ Image API from C# Pin
Luc Pattyn13-Jan-11 5:18
sitebuilderLuc Pattyn13-Jan-11 5:18 
AnswerRe: Calling C++ Image API from C# [modified] Pin
econner13-Jan-11 6:11
econner13-Jan-11 6:11 

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.