Click here to Skip to main content
15,892,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiondisable end program notification in console application Pin
Arif Liminto10-Feb-09 14:53
professionalArif Liminto10-Feb-09 14:53 
AnswerRe: disable end program notification in console application Pin
Eytukan10-Feb-09 16:18
Eytukan10-Feb-09 16:18 
GeneralRe: disable end program notification in console application Pin
Arif Liminto10-Feb-09 16:27
professionalArif Liminto10-Feb-09 16:27 
GeneralRe: disable end program notification in console application Pin
Eytukan10-Feb-09 16:30
Eytukan10-Feb-09 16:30 
GeneralRe: disable end program notification in console application Pin
Arif Liminto10-Feb-09 17:50
professionalArif Liminto10-Feb-09 17:50 
Questionreturn in catch block Pin
clawton10-Feb-09 11:06
clawton10-Feb-09 11:06 
AnswerRe: return in catch block Pin
Stuart Dootson10-Feb-09 11:26
professionalStuart Dootson10-Feb-09 11:26 
GeneralRe: return in catch block Pin
clawton10-Feb-09 11:32
clawton10-Feb-09 11:32 
Stuart Dootson wrote:
Is it in Release or Debug mode?

Debug mode.


Stuart Dootson wrote:
clawton wrote:
The disassembly code is very strange indeed


In what sense?

Well, I see the line with "return 1" in there twice...Confused | :confused:
Pasting from the dissassembly output window:

std::vector<int> v;
004131C6 lea ecx,[ebp-34h]
004131C9 call std::vector<int,std::allocator<int> >::vector<int,std::allocator<int> > (4110C3h)
004131CE mov dword ptr [ebp-4],0

try {
004131D5 mov byte ptr [ebp-4],1
v.push_back(1);
004131D9 mov dword ptr [ebp-118h],1
004131E3 lea eax,[ebp-118h]
004131E9 push eax
004131EA lea ecx,[ebp-34h]
004131ED call std::vector<int,std::allocator<int> >::push_back (4119B5h)
004131F2 jmp $LN5 (413211h)
} catch (std::exception &) {
return 1;
004131F4 mov dword ptr [ebp-10Ch],1
004131FE mov dword ptr [ebp-4],0
00413205 mov eax,offset $LN9 (41321Ah)
0041320A ret
void CCatchTestDlg::OnBnClickedOk()
{

Test(1,0);


}

int CCatchTestDlg::Test(int foo, unsigned char * goo)
{
std::vector<int> v;

try {
v.push_back(1);
} catch (std::exception &) {
return 1;
}
0041320B mov eax,offset $LN5 (413211h)
00413210 ret
} catch (std::exception &) {
return 1;
00413211 mov dword ptr [ebp-4],0
00413218 jmp $LN9+17h (413231h)
$LN9:
0041321A mov dword ptr [ebp-4],0FFFFFFFFh
00413221 lea ecx,[ebp-34h]
00413224 call std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> > (41192Eh)
00413229 mov eax,dword ptr [ebp-10Ch]
0041322F jmp $LN9+54h (41326Eh)

if (v.size()) {
00413231 lea ecx,[ebp-34h]
00413234 call std::vector<int,std::allocator<int> >::size (4115A5h)
GeneralRe: return in catch block Pin
Stuart Dootson10-Feb-09 12:10
professionalStuart Dootson10-Feb-09 12:10 
GeneralRe: return in catch block Pin
Stuart Dootson10-Feb-09 12:10
professionalStuart Dootson10-Feb-09 12:10 
GeneralRe: return in catch block Pin
Luc Pattyn10-Feb-09 15:04
sitebuilderLuc Pattyn10-Feb-09 15:04 
AnswerRe: return in catch block Pin
Eytukan10-Feb-09 16:19
Eytukan10-Feb-09 16:19 
AnswerRe: return in catch block Pin
ehaerim21-Nov-11 14:15
ehaerim21-Nov-11 14:15 
GeneralRe: return in catch block Pin
clawton21-Nov-11 17:45
clawton21-Nov-11 17:45 
QuestionResolve the IP from a MAC (ARP) Pin
thelonesquirrely10-Feb-09 10:40
thelonesquirrely10-Feb-09 10:40 
AnswerRe: Resolve the IP from a MAC (ARP) Pin
led mike10-Feb-09 11:01
led mike10-Feb-09 11:01 
GeneralRe: Resolve the IP from a MAC (ARP) Pin
thelonesquirrely10-Feb-09 11:11
thelonesquirrely10-Feb-09 11:11 
GeneralRe: Resolve the IP from a MAC (ARP) Pin
led mike10-Feb-09 11:45
led mike10-Feb-09 11:45 
GeneralRe: Resolve the MAC from an IP (ARP) Pin
thelonesquirrely10-Feb-09 11:59
thelonesquirrely10-Feb-09 11:59 
GeneralRe: Resolve the MAC from an IP (ARP) Pin
Stuart Dootson10-Feb-09 12:20
professionalStuart Dootson10-Feb-09 12:20 
Questionhow to drawline on picture box in MFC/C++? Pin
ping_jacob10-Feb-09 7:44
ping_jacob10-Feb-09 7:44 
AnswerRe: how to drawline on picture box in MFC/C++? Pin
Stuart Dootson10-Feb-09 8:06
professionalStuart Dootson10-Feb-09 8:06 
QuestionConverting Byte array to Varinat and Variant to Byte array Pin
Elsie10-Feb-09 7:23
Elsie10-Feb-09 7:23 
AnswerRe: Converting Byte array to Varinat and Variant to Byte array Pin
Stuart Dootson10-Feb-09 8:13
professionalStuart Dootson10-Feb-09 8:13 
GeneralRe: Converting Byte array to Varinat and Variant to Byte array Pin
Elsie10-Feb-09 16:33
Elsie10-Feb-09 16:33 

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.