Click here to Skip to main content
       

Managed C++/CLI

 
AnswerRe: How to call a function in DLL created in C++ in 2008 .NET PinmemberKrishnakumartg24-Aug-12 5:56 
QuestionHow to activate keys combination with hook ? Pinmemberzayl54317-Aug-12 0:18 
SuggestionRe: How to activate keys combination with hook ? Pinmembersanjaylk12-Sep-12 2:00 
Questionvoid GetFieldValue( LPCTSTR lpszName, CString& strValue ); Pinmemberlucky_122119-Jul-12 22:21 
Questionsearch in a text fiel Pinmemberbyank18-Jul-12 2:06 
AnswerRe: search in a text fiel PinmvpRichard MacCutchan18-Jul-12 3:28 
GeneralRe: search in a text fiel [modified] Pinmemberbyank19-Jul-12 10:58 
GeneralRe: search in a text fiel PinmvpRichard MacCutchan19-Jul-12 22:05 
QuestionConvert string to integer only such that if it is alphanumeric or float it shouldnot return anything PinmemberAbinash Mohanty17-Jul-12 3:13 
GeneralRe: Convert string to integer only such that if it is alphanumeric or float it shouldnot return anything [modified] PinmemberJohn Schroedl17-Jul-12 3:29 
GeneralRe: Convert string to integer only such that if it is alphanumeric or float it shouldnot return anything PinmemberAbinash Mohanty17-Jul-12 18:13 
QuestionRead char by char in a file after write char by char to another file in vc++. Pinmemberlucky_122116-Jul-12 23:03 
AnswerRe: Read char by char in a file after write char by char to another file in vc++. PinmvpRichard MacCutchan16-Jul-12 23:32 
QuestionC++/CLI - Pin a function pointer Pinmemberkrishter10-Jul-12 23:16 
I need to pass a managed callback to an unmanaged TCP receiver. Since its a thread that needs to exist for the lifetime of the application, I need to prevent it from getting garbage collected. I have read everywhere that pinning function pointers is not required and the GCHandle.Alloc will do the job of preventing garbage collection.
 
But is this a given? I have seen that the AppPool hosting this code crashes with an access violation. Why should I not suspect the fact that this error occurs because the function pointer was garbage collected?
 
Why does pinning the pointer as below reduce the number of crashes?
typedef void (__cdecl *ProcMessageFunc)(void* param, void* paramBuf, ULONG bufSize);
FuncDelegate^ fp = gcnew MessageFuncDelegate(this, &Handler);
pin_ptr<MessageFuncDelegate^> pinnedFunctionPointer = &fp;
ret = Receiver ((ProcMessageFunc)pinnedFunctionPointer);

GeneralRe: C++/CLI - Pin a function pointer [modified] Pinmemberpaul_7114-Jul-12 23:51 
QuestionHow to Make and Use Resource DialogBoxes in VC++ 2008 PinmemberICEFLOWER226-Jun-12 4:07 
AnswerRe: How to Make and Use Resource DialogBoxes in VC++ 2008 PinmvpRichard MacCutchan26-Jun-12 4:31 
GeneralRe: How to Make and Use Resource DialogBoxes in VC++ 2008 PinmemberICEFLOWER226-Jun-12 7:53 
GeneralRe: How to Make and Use Resource DialogBoxes in VC++ 2008 PinmvpRichard MacCutchan26-Jun-12 8:24 
QuestionGetting MdiParent Instance From MdiChild - Windows Forms Application PinmemberParamu197312-Jun-12 1:50 
AnswerRe: Getting MdiParent Instance From MdiChild - Windows Forms Application PinmvpRichard MacCutchan12-Jun-12 2:15 
GeneralRe: Getting MdiParent Instance From MdiChild - Windows Forms Application [modified] PinmemberParamu197312-Jun-12 2:30 
GeneralRe: Getting MdiParent Instance From MdiChild - Windows Forms Application PinmvpRichard MacCutchan12-Jun-12 3:03 
GeneralRe: Getting MdiParent Instance From MdiChild - Windows Forms Application PinmemberParamu197315-Jun-12 1:30 
QuestionHow to convert from 'WCHAR' to 'System::String ^' Managed C++ Pinmemberptr_Electron7-Jun-12 20:08 
AnswerRe: How to convert from 'WCHAR' to 'System::String ^' Managed C++ PinmvpRichard MacCutchan7-Jun-12 21:58 
Questionint x = (Int32) thisisObjectType is boxing, if the type is already checked ? Pinmemberptr_Electron7-Jun-12 18:15 
AnswerRe: int x = (Int32) thisisObjectType is boxing, if the type is already checked ? PinmvpRichard MacCutchan8-Jun-12 0:34 
QuestionVS2010 Error()- Method or Property 'VCFilter::get_Url Behavior' deprecated and nolonger implemented [modified] PinmemberParamu19736-Jun-12 23:57 
QuestionC++ CX and WPF PinmemberSuper Lloyd6-Jun-12 15:04 
QuestionStrong vs static typing Pinmemberelelont25-Jun-12 9:37 
AnswerRe: Strong vs static typing PinmemberPaul Conrad5-Jun-12 10:37 
GeneralRe: Strong vs static typing PinmvpLuc Pattyn5-Jun-12 11:13 
GeneralRe: Strong vs static typing PinmemberPaul Conrad5-Jun-12 12:10 
AnswerRe: Strong vs static typing PinmvpRichard MacCutchan5-Jun-12 21:08 
GeneralRe: Strong vs static typing Pinmemberelelont26-Jun-12 5:09 
GeneralRe: Strong vs static typing PinmvpRichard MacCutchan6-Jun-12 5:21 
QuestionImage Integral PinmemberMUJIS29-May-12 4:40 
QuestionHow to get the total length of elements in ##__VA_ARGS__ Pinmemberelelont222-May-12 3:10 
AnswerRe: How to get the total length of elements in ##__VA_ARGS__ Pinmemberjschell28-May-12 7:57 
QuestionA calendar look like iCal of MacOsX PinmemberXRay221-May-12 4:30 
Questionc++ A Cessna Skyhawk Skeleton for Further Development in OpenGL (GLUT) Pinmemberody kurniawan18-May-12 11:55 
QuestionType casting Pinmembergivinisha17-May-12 6:50 
AnswerRe: Type casting PinmemberJohn Schroedl17-May-12 8:01 
QuestionVideo Display hangs in Windows after unlocking PinmemberFaez Shingeri16-May-12 21:37 
AnswerRe: Video Display hangs in Windows after unlocking - Repost ... PinmvpRichard MacCutchan16-May-12 23:12 
GeneralRe: Video Display hangs in Windows after unlocking - Repost ... PinmemberFaez Shingeri16-May-12 23:16 
GeneralRe: Video Display hangs in Windows after unlocking - Repost ... PinmemberJohn Schroedl17-May-12 3:28 
AnswerRe: Video Display hangs in Windows after unlocking Pinmemberjschell17-May-12 11:26 
QuestionFinding a pointer from a list of pointers Pinmemberelelont226-Apr-12 20:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.140718.1 | Last Updated 11 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid