|
This is how i create the browse dialog box.
void CBrowseDlg::OnBrowse[]
[
CFileDialog objFileDlg[TRUE,NULL,NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, NULL];
if(IDOK == objFileDlg.DoModal[]]
[
//update the filename and pass phrase
m_csPvtKeyFile = objFileDlg.GetPathName[];
UpdateData[FALSE];
]
]
The Crash had happened while dialog box was open. I am unable to simulate this type of crash again. fortunately i had the process dump running.
Does this way of creating file dialog inherently has some problem.
or the Error is related to type of operation I do which is similar to browsing in My Computer, which i cannot do anything about.
Apparently I had seen some discussion on similar kind of problem which was solved by window hotfix
http://www.bokebb.com/dev/english/1960/posts/196055272.shtml
While trying to replicate the problem I had come across another crash in the browse dialog box.
which seems to be related to the winzip.dll
Analysis Summary
Type:
Error
Description :
WARNING - DebugDiag was not able to locate debug symbols for WZSHLEX1.DLL, so the information below may be incomplete.
In notepad2912.dmp the assembly instruction at WZSHLEX1+1028 in C:\Program Files\WinZip\WZSHLEX1.DLL from WinZip Computing, Inc. has caused an access violation exception (0xC0000005) when trying to read from memory location 0x01c906cb on thread 0
Please follow up with the vendor WinZip Computing, Inc. for C:\Program Files\WinZip\WZSHLEX1.DLL
Recommendation :
Information DebugDiag determined that this dump file (notepad2912.dmp) is a crash dump and did not perform any hang analysis. If you wish to enable combined crash and hang analysis for crash dumps, edit the CrashHangAnalysis.asp script (located in the DebugDiag\Scripts folder) and set the g_DoCombinedAnalysis constant to True.
Analysis Details
Table Of Contents
notepad2912.dmp
Faulting Thread
Faulting Module Information
Report for notepad2912.dmp
Report for notepad2912.dmp
Type of Analysis Performed Crash Analysis
Machine Name XYZ
Operating System Windows XP Service Pack 2
Number Of Processors 2
Process ID 2908
Process Image E:\myproj\notepad.exe
System Up-Time 00:50:44
Process Up-Time 00:37:15
Thread 0 - System ID 2912
Entry point notepad!WinMainCRTStartup
Create time 2008-07-23 10:49:36 AM
Time spent in user mode 0 Days 0 :4.843
Time spent in kernel mode 0 Days 0 :15.15
Function Arg 1 Arg 2 Arg 3 Source
WZSHLEX1+1028 001522a8 0019c788 00000003
shell32!HDXA_AppendMenuItems+44 001522a8 0019c788 00000003
shell32!CFSDropTarget::_DragDropMenu+9c 001522a8 001e76e8 001e7660
shell32!CFSDropTarget::Drop+119 001d8fb0 0019c788 00000000
shell32!CDVDropTarget::Drop+f4 0019c788 00000000 00000178
shell32!CDefView::Drop+1f 001e7670 0019c788 00000000
ole32!CInterfaceFromWindowProp::PrivDragDrop+cd 0018ae08 00000000 00000000
ole32!PrivDragDrop+97 003409ba 00000004 028093d0
ole32!CDropTarget::Drop+4e 028162f8 0019c788 00000000
ole32!CDragOperation::CompleteDrop+3e 0019c788 028093d0 00190aa8
ole32!DoDragDrop+ab 0019c788 00190aa8 00000007
shell32!SHDoDragDrop+7e 001803b4 0019c788 00190aa8
shell32!CDefView::_OnBeginDrag+f1 0019c788 0012d10c 001e7660
shell32!CDefView::_OnLVNotify+5e8 0012d10c 001e7660 001e7660
shell32!CDefView::_OnNotify+7c 0012d10c 00000000 001e7660
shell32!CDefView::WndProc+860 00520a18 0000004e 00000001
shell32!CDefView::s_WndProc+72 00520a18 0000004e 00000001
user32!InternalCallWinProc+28 7c9f1f2f 00520a18 0000004e
user32!UserCallWinProcCheckWow+150 0015a308 7c9f1f2f 00520a18
user32!SendMessageWorker+4a5 008f17a8 008cd870 00000001
user32!SendMessageW+7f 00520a18 0000004e 00000001
comctl32_773d0000!CCSendNotify+c20 001864c0 ffffff93 0012d10c
comctl32_773d0000!ListView_HandleMouse+2d8 003409ba 00000000 0000002c
comctl32_773d0000!ListView_OnButtonDown+1b 001864c0 00000000 0000002c
comctl32_773d0000!ListView_WndProc+857 003409ba 00000201 00000001
user32!InternalCallWinProc+28 77420c82 003409ba 00000201
user32!UserCallWinProcCheckWow+150 0015a308 77420c82 003409ba
user32!DispatchMessageWorker+306 0012d43c 00000000 0012d420
user32!DispatchMessageW+f 0012d43c 00000000 0087c3f8
user32!IsDialogMessageW+572 001803b4 008ec930 00040a06
user32!DialogBox2+144 001803b4 00040a06 00000010
user32!InternalDialogBox+d0 763b0000 001a8a58 00040a06
user32!DialogBoxIndirectParamAorW+37 763b0000 001a8a58 00040a06
user32!DialogBoxIndirectParamW+1b 763b0000 001a8a58 00040a06
comdlg32!NewGetFileName+240 00000000 00000001 0012d548
comdlg32!NewGetOpenFileName+f 0012d598 00000000 001b9ee8
comdlg32!GetFileName+35d 0012d598 763c7705 0012e878
comdlg32!GenericGetFileNameA+475 0012e6dc 763c7705 0012e65c
comdlg32!GetOpenFileNameA+23 0012e6dc 0012e878 00158ee0
MFC42D!CFileDialog::DoModal+1ac 0012eb24 cccccccc cccccccc
notepad!CConfigProfKey::OnBrowse+8b 0012eb24 00158ee0 00000000
MFC42D!_AfxDispatchCmdMsg+a2 0012f014 00000234 00000000
MFC42D!CCmdTarget::OnCmdMsg+274 00000234 00000000 00000000
MFC42D!CDialog::OnCmdMsg+24 00000234 00000000 00000000
MFC42D!CWnd::OnCommand+138 00000234 000909a2 0012eb24
MFC42D!CWnd::OnWndMsg+53 00000111 00000234 000909a2
MFC42D!CWnd::WindowProc+2e 00000111 00000234 000909a2
MFC42D!AfxCallWndProc+ed 0012f014 00040a06 00000111
MFC42D!AfxWndProc+81 00040a06 00000111 00000234
MFC42D!AfxWndProcBase+4a 00040a06 00000111 00000234
user32!InternalCallWinProc+28 5f490453 00040a06 00000111
user32!UserCallWinProcCheckWow+150 00000000 5f490453 00040a06
user32!SendMessageWorker+4a5 008f0ae0 008c6540 00000234
user32!SendMessageW+7f 00040a06 00000111 00000234
user32!xxxButtonNotifyParent+41 008f0458 00000000 008f0458
user32!xxxBNReleaseCapture+f8 00180fd8 00000001 00000000
user32!ButtonWndProcWorker+6d5 008f0458 00000202 00000000
user32!ButtonWndProcA+5d 000909a2 00000202 00000000
user32!InternalCallWinProc+28 7e43affe 000909a2 00000202
user32!UserCallWinProcCheckWow+150 00000000 7e43affe 000909a2
user32!DispatchMessageWorker+306 0060d000 00000000 0012ee84
user32!DispatchMessageW+f 0060d000 0060d000 0060d008
user32!IsDialogMessageW+572 00040a06 008f0458 0012f0f4
user32!IsDialogMessageA+fd 00040a06 0060d000 0012f0f4
MFC42D!CWnd::IsDialogMessageA+7b 0060d000 0012f0f4 00158ee0
MFC42D!CWnd::PreTranslateInput+75 0060d000 0012f0f4 00158ee0
MFC42D!CDialog::PreTranslateMessage+f8 0060d000 0012f0f4 00158ee0
MFC42D!CWnd::WalkPreTranslateTree+98 0001077c 0060d000 0060cfc8
MFC42D!CWinThread::PreTranslateMessage+55 0060d000 0012f0f4 00158ee0
MFC42D!CWinThread::PumpMessage+e2 0012f0f4 00158ee0 00000000
MFC42D!CWnd::RunModalLoop+202 00000004 0012f0f4 00158ee0
MFC42D!CDialog::DoModal+191 0012f3a0 00158ee0 cccccccc
notepad!CConfigProfAuthDlg::OnUnsave+1fb 0012f3a0 00158ee0 00000000
MFC42D!_AfxDispatchCmdMsg+a2 00bd5dc0 00000193 00000000
MFC42D!CCmdTarget::OnCmdMsg+274 00000193 00000000 00000000
MFC42D!CDialog::OnCmdMsg+24 00000193 00000000 00000000
MFC42D!CWnd::OnCommand+138 00000193 000509e2 0012f3a0
MFC42D!CWnd::OnWndMsg+53 00000111 00000193 000509e2
MFC42D!CWnd::WindowProc+2e 00000111 00000193 000509e2
MFC42D!AfxCallWndProc+ed 00bd5dc0 000b0984 00000111
MFC42D!AfxWndProc+81 000b0984 00000111 00000193
MFC42D!AfxWndProcBase+4a 000b0984 00000111 00000193
user32!InternalCallWinProc+28 5f490453 000b0984 00000111
user32!UserCallWinProcCheckWow+150 00000000 5f490453 000b0984
user32!SendMessageWorker+4a5 008eaf28 008c6540 00000193
user32!SendMessageW+7f 000b0984 00000111 00000193
user32!xxxButtonNotifyParent+41 008f0c68 00000000 008f0c68
user32!xxxBNReleaseCapture+f8 00163f80 00000001 00000000
user32!ButtonWndProcWorker+6d5 008f0c68 00000202 00000000
user32!ButtonWndProcA+5d 000509e2 00000202 00000000
user32!InternalCallWinProc+28 7e43affe 000509e2 00000202
user32!UserCallWinProcCheckWow+150 00000000 7e43affe 000509e2
user32!CallWindowProcAorW+98 7e43affe 000509e2 00000202
user32!CallWindowProcA+1b 7e43affe 000509e2 00000202
MFC42D!CWnd::DefWindowProcA+32 00000202 00000000 00100005
MFC42D!CWnd::WindowProc+4c 00000202 00000000 00100005
MFC42D!AfxCallWndProc+ed 00bd5f28 000509e2 00000202
MFC42D!AfxWndProc+81 000509e2 00000202 00000000
MFC42D!AfxWndProcBase+4a 000509e2 00000202 00000000
user32!InternalCallWinProc+28 5f490453 000509e2 00000202
user32!UserCallWinProcCheckWow+150 00000000 5f490453 000509e2
user32!DispatchMessageWorker+306 0060d000 00000000 0012f8f4
user32!DispatchMessageW+f 0060d000 0060d000 0060d008
user32!IsDialogMessageW+572 000b0984 008f0c68 0012fa78
user32!IsDialogMessageA+fd 000b0984 0060d000 0012fa78
MFC42D!CWnd::IsDialogMessageA+7b 0060d000 0012fa78 0012fa84
MFC42D!CWnd::PreTranslateInput+75 0060d000 0012fa78 0012fa84
MFC42D!CDialog::PreTranslateMessage+f8 0060d000 00bd5dc0 0012f9a8
notepad!CConfigProfAuthDlg::PreTranslateMessage+56 0060d000 0012fa78 0012fa84
MFC42D!CWnd::WalkPreTranslateTree+98 0001077c 0060d000 0060cfc8
MFC42D!CWinThread::PreTranslateMessage+55 0060d000 0012fa78 0012fa84
MFC42D!CWinThread::PumpMessage+e2 0012fa78 0012fa84 00000000
MFC42D!CWnd::RunModalLoop+202 00000004 0012fa78 0012fa84
MFC42D!CDialog::DoModal+191 0012fc40 00158ee0 cccccccc
notepad!CnotepadApp::OnAppConfiguration+fa 00bcdd10 0012fbc0 5f42f2ac
notepad!CBlockerDlg::OpenCnotepadDlg+18 00000000 00000000 0012fc40
MFC42D!CWnd::OnWndMsg+69a 0000193b 00000000 00000000
MFC42D!CWnd::WindowProc+2e 0000193b 00000000 00000000
MFC42D!AfxCallWndProc+ed 00bcdd10 0001077c 0000193b
MFC42D!AfxWndProc+81 0001077c 0000193b 00000000
MFC42D!AfxWndProcBase+4a 0001077c 0000193b 00000000
user32!InternalCallWinProc+28 5f490453 0001077c 0000193b
user32!UserCallWinProcCheckWow+150 00000000 5f490453 0001077c
user32!DispatchMessageWorker+306 0060d000 00000001 0012fdd0
user32!DispatchMessageA+f 0060d000 0012fedc 0012fe74
MFC42D!CWinThread::PumpMessage+100 0012fedc 0012fe74 7ffd5000
MFC42D!CWnd::RunModalLoop+202 00000004 0012fedc 0012fe74
MFC42D!CDialog::DoModal+191 00000000 7c91d496 00bcdd10
notepad!CnotepadApp::InitInstance+419 00000000 7c91d496 7ffd5000
MFC42D!AfxWinMain+83 00400000 00000000 001523af
notepad!WinMain+18 00400000 00000000 001523af
notepad!WinMainCRTStartup+1b3 00000000 7c91d496 7ffd5000
kernel32!BaseProcessStart+23 005a4440 00000000 00905a4d
WZSHLEX1+1028WARNING - DebugDiag was not able to locate debug symbols for WZSHLEX1.DLL, so the information below may be incomplete.
In notepad2912.dmp the assembly instruction at WZSHLEX1+1028 in C:\Program Files\WinZip\WZSHLEX1.DLL from WinZip Computing, Inc. has caused an access violation exception (0xC0000005) when trying to read from memory location 0x01c906cb on thread 0
Module Information
Image Name: C:\Program Files\WinZip\WZSHLEX1.DLL Symbol Type: Export
Base address: 0x16250000 Time Stamp: Wed Apr 19 23:03:41 2000
Checksum: 0x00000000 Comments: StringFileInfo: U.S. English
COM DLL: True Company Name: WinZip Computing, Inc.
ISAPIExtension: False File Description: WinZip Shell Extension DLL
ISAPIFilter: False File Version: 3.0 (32-bit)
Managed DLL: False Internal Name: WZSHLEXT.DLL
VB DLL: False Legal Copyright: Copyright (c) WinZip Computing, Inc. 1991-2000 - All Rights Reserved
Loaded Image Name: WZSHLEX1.DLL Legal Trademarks: WinZip is a registered trademark of WinZip Computing, Inc
Mapped Image Name: C:\Program Files\WinZip\WZSHLEX1.DLL Original filename: WZSHLEXT.DLL
Module name: WZSHLEX1 Private Build:
Single Threaded: False Product Name: WinZip
Module Size: 152.00 KBytes Product Version: 8.0 (3081)
Symbol File Name: WZSHLEX1.DLL Special Build: &
|
|
|
|
|
Why are you using [] instead of () and {}? Other than that, your code snippet worked fine for me.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The problem is solved after patching the OS with microsoft hotfixes
|
|
|
|
|
Hello all,
I got debug assertion error in afxwin2.inl line no. 197. When I inspect this I found that the error occur after I use SetTimer(1,100,NULL);. I have correct message map for Timer and proper function for timer event but I dont know what is the problem is, please help me.
SetTimer(1,100,NULL);
ON_WM_TIMER()
afx_msg void OnTimer(UINT nIDEvent);
void Test::OnTimer(UINT nIDEvent)
{
if(nIDEvent==1)
{
if(flag41==1)
{
Disconnect();
}
}
}
|
|
|
|
|
What is line 197 of afxwin2.inl asserting?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'm guessing you're calling SetTimer() before your window's HWND is created.
Where do you call SetTimer() from?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Dear Mark,
I call SetTimer from a function a function defined by me (user defined). The Window is created before calling the SetTimer().
Please advice.
|
|
|
|
|
bhanu_8509 wrote: I got debug assertion error in afxwin2.inl line no. 197
There's no guarantee that line 197 of "afxwin2.inl" is the same in two different versions of MFC. Always look at the assert, as in general there'll be a comment near the assertion that explains what's going wrong. If that fails to help post some of the code around the actual assert.
Steve
|
|
|
|
|
Dear friends,
> mfc80d.dll!CWnd::SetTimer(unsigned int nIDEvent=1, unsigned int nElapse=100, void (HWND__ *, unsigned int, unsigned int, unsigned long)* lpfnTimer=0x00000000) Line 197 + 0x2b bytes C++
The above is the info when I access the SetTimer function. The info is obtained from STACK. The line in afxwin2.inl is below:
{ ASSERT(::IsWindow(m_hWnd)); return ::SetTimer(m_hWnd, nIDEvent, nElapse,
lpfnTimer); }
Please advice and help me.
|
|
|
|
|
Looks like Mark was on the right path when he said, "I'm guessing you're calling SetTimer() before your window's HWND is created."
The ASSERT fires because IsWindow returned FALSE . This indicates that the HWND isn't valid. What is the value of the m_hWnd member?
Steve
|
|
|
|
|
Dear Steve and Mark,
For the m_hWnd ,the value is NULL. When I inspect the variable, I have the following value.
CXX0030: Error: expression cannot be evaluated
Please advice.
|
|
|
|
|
Looks like you haven't created the window yet (as Mark said). See the CWnd::Create[^] function and its friends.
Steve
|
|
|
|
|
Dear Steve,
I am creating a Window from my own class like below. The window is created properly. I can see the window also. Please advice.
m_pWnd1 = new CMywnd1;
if(!m_pWnd1->CreateEx(NULL,
AfxRegisterWndClass(NULL,0,
(HBRUSH)::GetStockObject(BLACK_BRUSH),0),
LPCTSTR(""), WS_POPUP | WS_VISIBLE | WS_SYSMENU ,
115,51,600,405,my_hWnd1,NULL,NULL))
return;
my_hWnd1 = m_pWnd1->GetSafeHwnd();
|
|
|
|
|
Dear Steve and Mark,
I had overcome the issue in a tricky way (dont know the exact problem). I called the SetTimer in OnInitDialog() and it seems to be working fine. Actually, I am creating a popup dialog after creating the main dialog in my program. But I tried giving the SetTimer() before creating the popup window but the same error presists. When I give in OnInitDialog() I dont have any assertion error.
Please advice. Anyhow, I solve the problem without knowing what is actually happening.
Thank you very much for your kind responses.
Many thanks.
|
|
|
|
|
bhanu_8509 wrote: When I give in OnInitDialog() I dont have any assertion error.
That's because that's the first place you can use a CWnd object where its
HWND is valid
That's a perfectly acceptable place to call SetTimer(). Any time before the
WM_INITDIALOG message is received, the HWND isn't set yet, causing the error.
Any time AFTER your CreateEx() call should be fine too, as long as the create
succeeded. WM_INITDIALOG is just one of the messages sent DURING creation.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hey I was wondering what the best way to communicate my high scores to my website. I have a highscores.bin file and I need a way to open a socket on port 80 and upload/grab it from the server. Is this even possible and if not whats an easier way.
|
|
|
|
|
Look for a HTTP client or FTP client class. A FTP client is probably easier... with an HTTP client you need to install a CGI/script that allows uploading files to the web server.
Hope it helps!
/M
|
|
|
|
|
Hi,
I am creating a binary file in my application and i need to copy this binary file to another location using the CFileDialog class. how do i do that.
|
|
|
|
|
Get the path where you have to copy the file from CFileDialog and use CopyFile(/*params*/) or see SHFileOperation
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi there people.
I'm trying to redirect the stderr of a process let's say cmd.exe to a raw socket.
I have completed this task by setting the sterr parameter = my socket handle.
I was looking for a function that can take this handle and encrypt the stderr before
sending it to the socket. I could use CreateFile for exampe in order to cache the data
to a file and encrypt it here but it's a bad ugly solution.
In fact I was looking something like CreateBuffer or CreateByte array or MemoryStream of C#.
In other words an intermediate function with a HANDLE input that can return the bytes or something
in order to encrypt them.
Thanx
|
|
|
|
|
hi
how can i read entries from a specified section in the registry while i don't know the entries names? i need to read them all, whatever they might be.
i know that a way is to put a key in the section with a specified name valued with the number of entries and specify retrievable names for the others.
but is there any way other than this? i like to enumerate all of them without having to know the names exactly.
i hope i could describe my question
thx
|
|
|
|
|
Does RegEnumKey [^] fit your needs?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I began in 1984 with a ZX Spectrum, learning BASIC and Z80 Assembly, then I sleept for a while before returning to programming.
It is very unfair of you to have sleepted.
My troll needs to be attended here[^]
|
|
|
|
|
Rajesh R Subramanian wrote: I began in 1984 with a ZX Spectrum, learning BASIC and Z80 Assembly, then I sleept for a while before returning to programming.
Thank you for pointing out.
Rajesh R Subramanian wrote: My troll needs to be attended here[^]
Fixed. (Being so recent, in this morning patrol I didn't catch it).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Some lardass downvoted this[^] too.
|
|
|
|