Quote Originally Posted by beginner91 View Post
ok here is what is in callstack when the breakpoint is on the line with RPCExpect (1)
>
Code:
	DoRPC_Client.exe!@_EH4_CallFilterFunc@8()  + 0x12 bytes	Asm
 	DoRPC_Client.exe!_except_handler4(_EXCEPTION_RECORD * ExceptionRecord=0x0012f85c, _EXCEPTION_REGISTRATION_RECORD * EstablisherFrame=0x0012ff24, _CONTEXT * ContextRecord=0x0012f870, void * DispatcherContext=0x0012f830)  + 0xb9 bytes	C
 	ntdll.dll!770f7199() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
 	ntdll.dll!770f716b() 	
 	ntdll.dll!770cf98f() 	
 	ntdll.dll!770f6ff7() 	
 	KernelBase.dll!74bc812f() 	
 	KernelBase.dll!74bc812f() 	
 	KernelBase.dll!74bc812f() 	
 	rpcrt4.dll!74cbbf55() 	
 	rpcrt4.dll!74cae106() 	
 	rpcrt4.dll!74cae0d1() 	
 	rpcrt4.dll!74ca61eb() 	
 	DoRPC_Client.exe!Show(const unsigned char * szMsg=0x0012fee4)  Line 101 + 0x16 bytes	C
 	DoRPC_Client.exe!main()  Line 44 + 0x9 bytes	C
 	DoRPC_Client.exe!__tmainCRTStartup()  Line 266 + 0x19 bytes	C
 	DoRPC_Client.exe!mainCRTStartup()  Line 182	C
 	kernel32.dll!74d8ed6c() 	
 	ntdll.dll!7711377b() 	
 	ntdll.dll!7711374e()
Well, now it is clear that the last statementof your code that was tried to execute was
Code:
DoRPC_Client.exe!Show(const unsigned char * szMsg=0x0012fee4)  Line 101 + 0x16 bytes
- in your Show() function.
So why don't you want to set the breakpoint at the beginning of this function then debug it step-by-step (F10) to exactly know what statement/call causes the exception?