Click here to Skip to main content
15,867,568 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
PinnedThe C++ / CLI is for managed and mixed-mode C++ programming only Pin
Chris Maunder9-Jan-06 9:36
cofounderChris Maunder9-Jan-06 9:36 
QuestionConvert From C# to C++/CLI Pin
Paramu19731-Mar-24 14:26
Paramu19731-Mar-24 14:26 
QuestionTrying to Add System::ComponentModel Pin
Richard Andrew x649-Dec-23 10:10
professionalRichard Andrew x649-Dec-23 10:10 
AnswerRe: Trying to Add System::ComponentModel Pin
Gerry Schmitz9-Dec-23 10:55
mveGerry Schmitz9-Dec-23 10:55 
GeneralRe: Trying to Add System::ComponentModel Pin
Richard Andrew x649-Dec-23 13:25
professionalRichard Andrew x649-Dec-23 13:25 
AnswerRe: Trying to Add System::ComponentModel Pin
Richard MacCutchan9-Dec-23 21:11
mveRichard MacCutchan9-Dec-23 21:11 
QuestionTreelistView c++/cli Pin
Temblor21-Aug-23 23:05
Temblor21-Aug-23 23:05 
AnswerRe: TreelistView c++/cli Pin
Richard MacCutchan22-Aug-23 0:09
mveRichard MacCutchan22-Aug-23 0:09 
GeneralRe: TreelistView c++/cli Pin
Temblor22-Aug-23 3:57
Temblor22-Aug-23 3:57 
GeneralRe: TreelistView c++/cli Pin
Richard MacCutchan22-Aug-23 4:03
mveRichard MacCutchan22-Aug-23 4:03 
AnswerRe: TreelistView c++/cli Pin
jschell22-Aug-23 6:41
jschell22-Aug-23 6:41 
GeneralRe: TreelistView c++/cli Pin
Peter_in_278022-Aug-23 17:20
professionalPeter_in_278022-Aug-23 17:20 
GeneralRe: TreelistView c++/cli Pin
Temblor22-Aug-23 20:54
Temblor22-Aug-23 20:54 
GeneralRe: TreelistView c++/cli Pin
Richard MacCutchan22-Aug-23 21:48
mveRichard MacCutchan22-Aug-23 21:48 
GeneralRe: TreelistView c++/cli Pin
jschell23-Aug-23 6:47
jschell23-Aug-23 6:47 
AnswerRe: TreelistView c++/cli Pin
Gerry Schmitz23-Aug-23 5:49
mveGerry Schmitz23-Aug-23 5:49 
AnswerRe: TreelistView c++/cli Pin
Temblor23-Sep-23 3:54
Temblor23-Sep-23 3:54 
QuestionHeap Corruption in richedit Pin
ForNow15-Jan-23 12:49
ForNow15-Jan-23 12:49 
Hi

I am getting a heap corruption. I am running under the visual studio debugger. and the exception is at
Quote:

ntdll.dll!RtlReportCriticalFailure() Unknown


My scenario is I have a DLL reading and formatting data for a .exe. I keep a record count so when I get a exception, at
Quote:
ntdll.dll!RtlReportCriticalFailure() Unknown


I insert code if (recordcount == 0x0000196e) __debugbreak; I then start stepping through the code looking for the problem how ever when stepping through the code works I try this multiple times however when I stop the code where the exception were to occur it always complete successfully

The listing I am trying to to inset in the richedit is huge about 153 pages 30 lines to page, 134 bytes across I roughly calculate the number of bytes I am trying to insert into the richedit is 1.6 meg. I am not sure if the size is the issue I do a Rciheditctrl::LimitText with the amount bytes I need

Again when break on the offending record and step thru the code it completes normally


Here is the stack frame My code starts a the DriveRichedit.exe

ntdll.dll!RtlReportCriticalFailure() Unknown
ntdll.dll!RtlpHeapHandleError() Unknown
ntdll.dll!RtlpHpHeapHandleError() Unknown
ntdll.dll!RtlpLogHeapFailure() Unknown
ntdll.dll!RtlpHeapFindListLookupEntry() Unknown
ntdll.dll!RtlpFindEntry() Unknown
ntdll.dll!RtlpAllocateHeap() Unknown
ntdll.dll!RtlpAllocateHeapInternal() Unknown
riched20.dll!CTxtArray::AddBlock(long,long) Unknown
riched20.dll!CTxtArray::SplitBlock(long,long,long,long,int) Unknown
riched20.dll!CTxtPtr::InsertRange(long,unsigned short const *) Unknown
riched20.dll!CRchTxtPtr::ReplaceRange(long,long,unsigned short const *,class IUndoBuilder *,long,long *,unsigned long) Unknown
riched20.dll!CTxtRange::ReplaceRange(long,unsigned short const *,class IUndoBuilder *,enum SELRR,long *,unsigned long) Unknown
riched20.dll!CTxtRange::CheckLimitReplaceRange(long,unsigned short const *,int,class IUndoBuilder *,unsigned long,long *,long,int,unsigned long) Unknown
riched20.dll!CTxtRange::CleanseAndReplaceRange(long,unsigned short const *,int,class IUndoBuilder *,unsigned short *,long *,unsigned long) Unknown
riched20.dll!CLightDTEngine::ReadPlainText(class CTxtRange *,struct _editstream *,int,class IUndoBuilder *,long) Unknown
riched20.dll!CLightDTEngine::LoadFromEs(class CTxtRange *,long,struct _editstream *,int,class IUndoBuilder *) Unknown
riched20.dll!CTxtEdit::TxSendMessage(unsigned int,unsigned __int64,__int64,__int64 *) Unknown
riched20.dll!RichEditWndProc() Unknown
riched20.dll!RichEditANSIWndProc() Unknown
user32.dll!UserCallWinProcCheckWow() Unknown
user32.dll!CallWindowProcAorW(__int64 ,struct HWND__ *,enum _WM_VALUE,unsigned __int64,__int64,int) Unknown
user32.dll!CallWindowProcA() Unknown
mfc140d.dll!CWnd::DefWindowProcA(unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 1100 C++
mfc140d.dll!CWnd::WindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2100 C++
mfc140d.dll!AfxCallWndProc(CWnd * pWnd, HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 265 C++
mfc140d.dll!AfxWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 418 C++
mfc140d.dll!AfxWndProcBase(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 299 C++
user32.dll!UserCallWinProcCheckWow() Unknown
user32.dll!SendMessageWorker() Unknown
user32.dll!SendMessageInternal(struct HWND__ *,unsigned int,unsigned __int64,__int64,int) Unknown
user32.dll!SendMessageA() Unknown
mfc140d.dll!CRichEditCtrl::StreamIn(int nFormat, _editstream & es) Line 775 C++
> DriveRichEdit.exe!CProgDebug::OnInitDialog() Line 136 C++
[External Code]
DriveRichEdit.exe!CMainFrame::PROGDEBUG() Line 48 C++
[External Code]
DriveRichEdit.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 26 C++
[External Code]
AnswerRe: Heap Corruption in richedit Pin
Victor Nijegorodov15-Jan-23 20:26
Victor Nijegorodov15-Jan-23 20:26 
GeneralRe: Heap Corruption in richedit Pin
ForNow16-Jan-23 0:10
ForNow16-Jan-23 0:10 
Questiontrying to understand DLL and Thread local storage Pin
ForNow4-Dec-22 8:52
ForNow4-Dec-22 8:52 
AnswerRe: trying to understand DLL and Thread local storage Pin
Richard Deeming4-Dec-22 21:42
mveRichard Deeming4-Dec-22 21:42 
GeneralRe: trying to understand DLL and Thread local storage Pin
ForNow5-Dec-22 2:40
ForNow5-Dec-22 2:40 
GeneralRe: trying to understand DLL and Thread local storage Pin
Richard Deeming5-Dec-22 4:29
mveRichard Deeming5-Dec-22 4:29 
GeneralRe: trying to understand DLL and Thread local storage Pin
ForNow5-Dec-22 4:41
ForNow5-Dec-22 4:41 

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.