Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Casper Hansen19-Jun-09 3:54
Casper Hansen19-Jun-09 3:54 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Luc Pattyn19-Jun-09 4:18
sitebuilderLuc Pattyn19-Jun-09 4:18 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Revathij25-Jun-09 22:28
Revathij25-Jun-09 22:28 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Luc Pattyn25-Jun-09 23:39
sitebuilderLuc Pattyn25-Jun-09 23:39 
QuestionGetting all the nodes in a treeview Pin
Quake2Player16-Jun-09 7:16
Quake2Player16-Jun-09 7:16 
AnswerRe: Getting all the nodes in a treeview Pin
Dave Kreskowiak16-Jun-09 8:16
mveDave Kreskowiak16-Jun-09 8:16 
AnswerRe: Getting all the nodes in a treeview Pin
Eslam Afifi16-Jun-09 8:26
Eslam Afifi16-Jun-09 8:26 
AnswerRe: Getting all the nodes in a treeview Pin
I Believe In GOD16-Jun-09 11:07
I Believe In GOD16-Jun-09 11:07 
GeneralRe: Getting all the nodes in a treeview Pin
Quake2Player16-Jun-09 11:23
Quake2Player16-Jun-09 11:23 
GeneralRe: Getting all the nodes in a treeview Pin
Dave Kreskowiak16-Jun-09 12:06
mveDave Kreskowiak16-Jun-09 12:06 
QuestionDynamically applying font values to the label control from the database. Pin
praveenkumar_vittaboina16-Jun-09 6:26
praveenkumar_vittaboina16-Jun-09 6:26 
AnswerRe: Dynamically applying font values to the label control from the database. Pin
Henry Minute16-Jun-09 6:31
Henry Minute16-Jun-09 6:31 
Question[Message Deleted] Pin
mypicturefaded16-Jun-09 6:00
mypicturefaded16-Jun-09 6:00 
QuestionHow to Interop 2D char in c# Pin
platso_58816-Jun-09 4:42
platso_58816-Jun-09 4:42 
AnswerRe: How to Interop 2D char in c# Pin
Moim Hossain16-Jun-09 9:07
Moim Hossain16-Jun-09 9:07 
GeneralRe: How to Interop 2D char in c# Pin
platso_58816-Jun-09 18:34
platso_58816-Jun-09 18:34 
QuestionHow to get the document which is associated with a process having specific Guid value? Pin
svt gdwl16-Jun-09 4:31
svt gdwl16-Jun-09 4:31 
QuestionIPicture to byte[] Pin
Sander123432116-Jun-09 4:24
Sander123432116-Jun-09 4:24 
AnswerRe: IPicture to byte[] Pin
Rob Philpott16-Jun-09 4:47
Rob Philpott16-Jun-09 4:47 
GeneralRe: IPicture to byte[] Pin
Sander123432116-Jun-09 4:50
Sander123432116-Jun-09 4:50 
GeneralRe: IPicture to byte[] Pin
Rob Philpott16-Jun-09 4:57
Rob Philpott16-Jun-09 4:57 
AnswerRe: IPicture to byte[] Pin
0x3c016-Jun-09 8:58
0x3c016-Jun-09 8:58 
QuestionUnmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
DaveyM6916-Jun-09 3:57
professionalDaveyM6916-Jun-09 3:57 
AnswerRe: Unmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
Luc Pattyn16-Jun-09 4:27
sitebuilderLuc Pattyn16-Jun-09 4:27 
Hi Dave,

I strongly suspect .NET pins function parameters for you when there is a need to do so, of course only for as long as the native function is being called. This applies to:
- strings you pass to a const char*
- StringBuilders you pass to a char*
- delegates you pass to a function pointer
- etc.etc.

I have been doing this all along. I only use GCHandle to explicitly pin down things that need to remain natively in use after the native function returns, such as buffers that will be used asynchronously.

I've never used Marshal.GetFunctionPointerForDelegate(); I suspect the only real use for it is when a delegate is buried inside a larger structure. Same seems to apply for a lot of stuff in the Marshal class.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.

GeneralRe: Unmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
DaveyM6916-Jun-09 4:54
professionalDaveyM6916-Jun-09 4:54 

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.