Click here to Skip to main content
15,903,201 members
Home / Discussions / C#
   

C#

 
GeneralRe: dynamically add a flash object to a C# desktop application Pin
led mike26-Feb-09 7:11
led mike26-Feb-09 7:11 
GeneralRe: dynamically add a flash object to a C# desktop application Pin
led mike26-Feb-09 5:48
led mike26-Feb-09 5:48 
Questioncreate user and role + sql server for existing database programatically Pin
vineesh v26-Feb-09 3:19
vineesh v26-Feb-09 3:19 
AnswerRe: create user and role + sql server for existing database programatically Pin
Jimmanuel26-Feb-09 4:04
Jimmanuel26-Feb-09 4:04 
QuestionDll Import Pin
Alessio Granzotto26-Feb-09 3:13
Alessio Granzotto26-Feb-09 3:13 
AnswerRe: Dll Import Pin
Luc Pattyn26-Feb-09 9:18
sitebuilderLuc Pattyn26-Feb-09 9:18 
GeneralRe: Dll Import Pin
Alessio Granzotto27-Feb-09 0:42
Alessio Granzotto27-Feb-09 0:42 
AnswerRe: Dll Import Pin
Luc Pattyn27-Feb-09 1:36
sitebuilderLuc Pattyn27-Feb-09 1:36 
Hi Alessio,

I didn't realize, you and I had an earlier dialogue, and my message then ended on "Now the tricky part could be what comes next: how will managed code access the content of the image?". So that is what we are trying to do now Laugh | :laugh:

As I already said above, I don't trust or don't like the out IntPtr stuff. Let me expand on that: either you have data allocated by the managed world and you want to pass it (or a pointer to it) to the native world, so you probably would need the fixed keyword and no IntPtr, or the GCHandle class and no out/ref keywords. Or the memory gets allocated by the native world, and then the managed world must somehow either (1) adopt the thing as if it were a managed object (which it is not), or (2) create an object and copy all the data (which I typically don't like). AFAIK you will need to call some of the Marshal methods explicitly, however I can't provide any details, I never did such things since most Win32 API calls don't need it, and when I can choose (because the native code is mine too) I keep the data marshaling simple and try to allocate objects always on the managed side.

"Now the tricky part could be what comes next: how will managed code access the content of the image?"

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


modified on Sunday, June 12, 2011 8:42 AM

QuestionTableLayoutPanel cell removal problem after shuffling it's controls Pin
Muammar©26-Feb-09 2:24
Muammar©26-Feb-09 2:24 
AnswerRe: TableLayoutPanel cell removal problem after shuffling it's controls Pin
Muammar©26-Feb-09 8:46
Muammar©26-Feb-09 8:46 
QuestionForms / Controls flicker during generation. Pin
MatthysDT26-Feb-09 2:23
MatthysDT26-Feb-09 2:23 
AnswerRe: Forms / Controls flicker during generation. Pin
#realJSOP26-Feb-09 3:00
professional#realJSOP26-Feb-09 3:00 
QuestionReccomended books on SQL server 2008 Pin
Mohsen Saad26-Feb-09 1:57
Mohsen Saad26-Feb-09 1:57 
AnswerRe: Reccomended books on SQL server 2008 Pin
Calin Tatar26-Feb-09 2:10
Calin Tatar26-Feb-09 2:10 
Questionprocess extension Pin
shefa' isied26-Feb-09 1:39
shefa' isied26-Feb-09 1:39 
AnswerRe: process extension Pin
EliottA26-Feb-09 2:07
EliottA26-Feb-09 2:07 
GeneralRe: process extension Pin
Calin Tatar26-Feb-09 2:33
Calin Tatar26-Feb-09 2:33 
QuestionHow to split a datatable?? Pin
Member 455443326-Feb-09 1:24
Member 455443326-Feb-09 1:24 
AnswerRe: How to split a datatable?? Pin
moon_stick26-Feb-09 2:54
moon_stick26-Feb-09 2:54 
QuestionTransform Excel to PDF Pin
abbd26-Feb-09 0:30
abbd26-Feb-09 0:30 
AnswerRe: Transform Excel to PDF Pin
Shyam K Pananghat26-Feb-09 0:34
Shyam K Pananghat26-Feb-09 0:34 
QuestionRe: Transform Excel to PDF Pin
abbd26-Feb-09 2:14
abbd26-Feb-09 2:14 
QuestionRe: Transform Excel to PDF Pin
abbd26-Feb-09 2:32
abbd26-Feb-09 2:32 
AnswerRe: Transform Excel to PDF Pin
Mirko198026-Feb-09 2:42
Mirko198026-Feb-09 2:42 
GeneralRe: Transform Excel to PDF Pin
abbd26-Feb-09 3:14
abbd26-Feb-09 3:14 

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.