Click here to Skip to main content
13,199,596 members (62,623 online)

Managed C++/CLI

 
GeneralRe: search in a text fiel Pin
byank19-Jul-12 10:58
memberbyank19-Jul-12 10:58 
GeneralRe: search in a text fiel Pin
Richard MacCutchan19-Jul-12 22:05
mvpRichard MacCutchan19-Jul-12 22:05 
QuestionConvert string to integer only such that if it is alphanumeric or float it shouldnot return anything Pin
Abinash Mohanty17-Jul-12 3:13
memberAbinash Mohanty17-Jul-12 3:13 
GeneralRe: Convert string to integer only such that if it is alphanumeric or float it shouldnot return anything Pin
John Schroedl17-Jul-12 3:29
memberJohn Schroedl17-Jul-12 3:29 
GeneralRe: Convert string to integer only such that if it is alphanumeric or float it shouldnot return anything Pin
Abinash Mohanty17-Jul-12 18:13
memberAbinash Mohanty17-Jul-12 18:13 
QuestionRead char by char in a file after write char by char to another file in vc++. Pin
lucky_122116-Jul-12 23:03
memberlucky_122116-Jul-12 23:03 
AnswerRe: Read char by char in a file after write char by char to another file in vc++. Pin
Richard MacCutchan16-Jul-12 23:32
mvpRichard MacCutchan16-Jul-12 23:32 
QuestionC++/CLI - Pin a function pointer Pin
krishter10-Jul-12 23:16
memberkrishter10-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 Pin
paul_7114-Jul-12 23:51
memberpaul_7114-Jul-12 23:51 
QuestionHow to Make and Use Resource DialogBoxes in VC++ 2008 Pin
ICEFLOWER226-Jun-12 4:07
memberICEFLOWER226-Jun-12 4:07 
AnswerRe: How to Make and Use Resource DialogBoxes in VC++ 2008 Pin
Richard MacCutchan26-Jun-12 4:31
mvpRichard MacCutchan26-Jun-12 4:31 
GeneralRe: How to Make and Use Resource DialogBoxes in VC++ 2008 Pin
ICEFLOWER226-Jun-12 7:53
memberICEFLOWER226-Jun-12 7:53 
GeneralRe: How to Make and Use Resource DialogBoxes in VC++ 2008 Pin
Richard MacCutchan26-Jun-12 8:24
mvpRichard MacCutchan26-Jun-12 8:24 
QuestionGetting MdiParent Instance From MdiChild - Windows Forms Application Pin
Paramu197312-Jun-12 1:50
memberParamu197312-Jun-12 1:50 
AnswerRe: Getting MdiParent Instance From MdiChild - Windows Forms Application Pin
Richard MacCutchan12-Jun-12 2:15
mvpRichard MacCutchan12-Jun-12 2:15 
GeneralRe: Getting MdiParent Instance From MdiChild - Windows Forms Application Pin
Paramu197312-Jun-12 2:30
memberParamu197312-Jun-12 2:30 
GeneralRe: Getting MdiParent Instance From MdiChild - Windows Forms Application Pin
Richard MacCutchan12-Jun-12 3:03
mvpRichard MacCutchan12-Jun-12 3:03 
GeneralRe: Getting MdiParent Instance From MdiChild - Windows Forms Application Pin
Paramu197315-Jun-12 1:30
memberParamu197315-Jun-12 1:30 
QuestionHow to convert from 'WCHAR' to 'System::String ^' Managed C++ Pin
ptr_Electron7-Jun-12 20:08
memberptr_Electron7-Jun-12 20:08 
AnswerRe: How to convert from 'WCHAR' to 'System::String ^' Managed C++ Pin
Richard MacCutchan7-Jun-12 21:58
mvpRichard MacCutchan7-Jun-12 21:58 
Questionint x = (Int32) thisisObjectType is boxing, if the type is already checked ? Pin
ptr_Electron7-Jun-12 18:15
memberptr_Electron7-Jun-12 18:15 
AnswerRe: int x = (Int32) thisisObjectType is boxing, if the type is already checked ? Pin
Richard MacCutchan8-Jun-12 0:34
mvpRichard MacCutchan8-Jun-12 0:34 
QuestionVS2010 Error()- Method or Property 'VCFilter::get_Url Behavior' deprecated and nolonger implemented Pin
Paramu19736-Jun-12 23:57
memberParamu19736-Jun-12 23:57 
QuestionC++ CX and WPF Pin
Super Lloyd6-Jun-12 15:04
memberSuper Lloyd6-Jun-12 15:04 
QuestionStrong vs static typing Pin
elelont25-Jun-12 9:37
memberelelont25-Jun-12 9: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.


Advertise | Privacy |
Web01 | 2.8.171020.1 | Last Updated 11 Oct 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid