all groups > visual studio .net debugging > december 2005 >
You're in the

visual studio .net debugging

group:

RPC Debugging problem


RPC Debugging problem Rich Fife
12/15/2005 6:23:18 PM
visual studio .net debugging: This is on Windows XP with Visual Studio .Net 2003.
Tools->Options->Debugging->Native->RPC debugging is checked.

I'm having some problems debugging an RPC server and was wondering if
anyone here had some wisdom.

Basically, I have a DMO video decoder that I'm using as an element of a
transcode. Windows Media player is using our DLL to decode an MPEG
video stream into it's component frames, rescaling them and then
compressing them with some other algorithm so they fit onto a Samsing
PMC (kind of like a video iPod). Anyway, media player launches
wmpenc.exe to do the actual transcoding and then communicates with it
via RPC. I know that if I change some of the internal settings for our
driver, it works. So I know the problem is in our DLL somehow.

Problem is, I can't get the debugger to break in our DLL. I know our
code is running, but I can't get it to break in the debugger. The
actually crash takes place in Media Player, which is too far removed
from our driver to allow me to step back in. I tried launching
WMPENC.EXE as the host exe for our driver, but it still doesn't work.
I tried embedding an _asm int 3 into our driver to get the debugger's
attention. Still nothing.

How can I get the .Net debugger to attach to our DLL before the crash
happens?

Thanks for any help!

-- Rich Fife --
Re: RPC Debugging problem Oleg Starodumov
12/16/2005 8:49:01 AM

[quoted text, click to view]

Instead of __asm int 3 you can try to show a message box, attach to the process
while the message box is shown, and then dismiss it. If the application is not interactive,
the same can be done using OutputDebugString followed by Sleep.

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]

Re: RPC Debugging problem Rich Fife
12/16/2005 9:15:44 AM
Good idea. I'll try it.

Thanks!

-- Rich Fife --
AddThis Social Bookmark Button