Click here to Skip to main content
15,847,963 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 10:36
cofounderChris Maunder9-Jan-06 10:36 
QuestionTrying to Add System::ComponentModel Pin
Richard Andrew x649-Dec-23 11:10
professionalRichard Andrew x649-Dec-23 11:10 
AnswerRe: Trying to Add System::ComponentModel Pin
Gerry Schmitz9-Dec-23 11:55
mveGerry Schmitz9-Dec-23 11:55 
GeneralRe: Trying to Add System::ComponentModel Pin
Richard Andrew x649-Dec-23 14:25
professionalRichard Andrew x649-Dec-23 14:25 
AnswerRe: Trying to Add System::ComponentModel Pin
Richard MacCutchan9-Dec-23 22:11
mveRichard MacCutchan9-Dec-23 22:11 
QuestionTreelistView c++/cli Pin
Temblor22-Aug-23 0:05
Temblor22-Aug-23 0:05 
AnswerRe: TreelistView c++/cli Pin
Richard MacCutchan22-Aug-23 1:09
mveRichard MacCutchan22-Aug-23 1:09 
GeneralRe: TreelistView c++/cli Pin
Temblor22-Aug-23 4:57
Temblor22-Aug-23 4:57 
GeneralRe: TreelistView c++/cli Pin
Richard MacCutchan22-Aug-23 5:03
mveRichard MacCutchan22-Aug-23 5:03 
AnswerRe: TreelistView c++/cli Pin
jschell22-Aug-23 7:41
jschell22-Aug-23 7:41 
GeneralRe: TreelistView c++/cli Pin
Peter_in_278022-Aug-23 18:20
professionalPeter_in_278022-Aug-23 18:20 
GeneralRe: TreelistView c++/cli Pin
Temblor22-Aug-23 21:54
Temblor22-Aug-23 21:54 
GeneralRe: TreelistView c++/cli Pin
Richard MacCutchan22-Aug-23 22:48
mveRichard MacCutchan22-Aug-23 22:48 
GeneralRe: TreelistView c++/cli Pin
jschell23-Aug-23 7:47
jschell23-Aug-23 7:47 
AnswerRe: TreelistView c++/cli Pin
Gerry Schmitz23-Aug-23 6:49
mveGerry Schmitz23-Aug-23 6:49 
AnswerRe: TreelistView c++/cli Pin
Temblor23-Sep-23 4:54
Temblor23-Sep-23 4:54 
QuestionHeap Corruption in richedit Pin
ForNow15-Jan-23 13:49
ForNow15-Jan-23 13: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 21:26
Victor Nijegorodov15-Jan-23 21:26 
GeneralRe: Heap Corruption in richedit Pin
ForNow16-Jan-23 1:10
ForNow16-Jan-23 1:10 
Questiontrying to understand DLL and Thread local storage Pin
ForNow4-Dec-22 9:52
ForNow4-Dec-22 9:52 
AnswerRe: trying to understand DLL and Thread local storage Pin
Richard Deeming4-Dec-22 22:42
mveRichard Deeming4-Dec-22 22:42 
GeneralRe: trying to understand DLL and Thread local storage Pin
ForNow5-Dec-22 3:40
ForNow5-Dec-22 3:40 
GeneralRe: trying to understand DLL and Thread local storage Pin
Richard Deeming5-Dec-22 5:29
mveRichard Deeming5-Dec-22 5:29 
GeneralRe: trying to understand DLL and Thread local storage Pin
ForNow5-Dec-22 5:41
ForNow5-Dec-22 5:41 
GeneralRe: trying to understand DLL and Thread local storage Pin
Richard Deeming5-Dec-22 7:01
mveRichard Deeming5-Dec-22 7:01 

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.