Click here to Skip to main content
14,773,757 members
Home » Discussions » C#
   

C#

 
GeneralRe: How to Interop 2D char in c# Pin
platso_58816-Jun-09 19:34
Memberplatso_58816-Jun-09 19:34 
QuestionHow to get the document which is associated with a process having specific Guid value? Pin
svt gdwl16-Jun-09 5:31
Membersvt gdwl16-Jun-09 5:31 
QuestionIPicture to byte[] Pin
Sander123432116-Jun-09 5:24
MemberSander123432116-Jun-09 5:24 
AnswerRe: IPicture to byte[] Pin
Rob Philpott16-Jun-09 5:47
MemberRob Philpott16-Jun-09 5:47 
GeneralRe: IPicture to byte[] Pin
Sander123432116-Jun-09 5:50
MemberSander123432116-Jun-09 5:50 
GeneralRe: IPicture to byte[] Pin
Rob Philpott16-Jun-09 5:57
MemberRob Philpott16-Jun-09 5:57 
AnswerRe: IPicture to byte[] Pin
0x3c016-Jun-09 9:58
Member0x3c016-Jun-09 9:58 
QuestionUnmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
DaveyM6916-Jun-09 4:57
professionalDaveyM6916-Jun-09 4:57 
I'm using a couple of API calls that require function pointers for callbacks.

So far I've been passing in a delegate instance and it's worked fine. I'm concerned that the delegate reference however may be changed in managed memory. On researching this I came accross the Marshal.GetFunctionPointerForDelegate method.

Some people say this is not needed as passing the delegate directly invokes the internal version of this anyway. Other's suggest that pinning the delegate or the class instance that contains it is necessary.

All MSDN has to offer is "You must manually keep the delegate from being collected by the garbage collector from managed code."

Has anyone had total success (or occaisional failures) just passing the delegate instance directly, or recommend a robust approach?

Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus)

AnswerRe: Unmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
Luc Pattyn16-Jun-09 5:27
sitebuilderLuc Pattyn16-Jun-09 5:27 
GeneralRe: Unmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
DaveyM6916-Jun-09 5:54
professionalDaveyM6916-Jun-09 5:54 
GeneralRe: Unmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
DaveyM6916-Jun-09 14:25
professionalDaveyM6916-Jun-09 14:25 
GeneralRe: Unmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
Luc Pattyn16-Jun-09 15:10
sitebuilderLuc Pattyn16-Jun-09 15:10 
GeneralRe: Unmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
DaveyM6917-Jun-09 1:46
professionalDaveyM6917-Jun-09 1:46 
GeneralRe: Unmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
DaveyM6917-Jun-09 10:07
professionalDaveyM6917-Jun-09 10:07 
GeneralRe: Unmanaged function pointers / Marshal.GetFunctionPointerForDelegate Pin
Luc Pattyn17-Jun-09 10:29
sitebuilderLuc Pattyn17-Jun-09 10:29 
Questionapp domain !!! help please!!! Pin
yams251016-Jun-09 4:33
Memberyams251016-Jun-09 4:33 
AnswerRe: app domain !!! help please!!! Pin
Manas Bhardwaj16-Jun-09 5:01
professionalManas Bhardwaj16-Jun-09 5:01 
AnswerRe: app domain !!! help please!!! Pin
Rob Philpott16-Jun-09 5:55
MemberRob Philpott16-Jun-09 5:55 
GeneralRe: app domain !!! help please!!! Pin
yams251016-Jun-09 20:05
Memberyams251016-Jun-09 20:05 
QuestionWMI Pin
arkiboys16-Jun-09 4:12
Memberarkiboys16-Jun-09 4:12 
AnswerRe: WMI Pin
Manas Bhardwaj16-Jun-09 4:17
professionalManas Bhardwaj16-Jun-09 4:17 
AnswerRe: WMI Pin
Luc Pattyn16-Jun-09 4:17
sitebuilderLuc Pattyn16-Jun-09 4:17 
GeneralRe: WMI Pin
arkiboys16-Jun-09 4:30
Memberarkiboys16-Jun-09 4:30 
AnswerRe: WMI Pin
Nagy Vilmos16-Jun-09 4:21
professionalNagy Vilmos16-Jun-09 4:21 
GeneralRe: WMI Pin
Luc Pattyn16-Jun-09 4:37
sitebuilderLuc Pattyn16-Jun-09 4:37 

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.