Page 1 of 1

VLC ActiveX: Breakpoint in play-procedure - WHY?

Posted: 18 Dec 2005 01:13
by Jess'ca
Hello,

it seems that the ActiveX control, that comes with the precompiled W32 VLC version has a static breakpoint build into the "play"-procedure.
This causes the debugger to break twice for every new file that has been opened.

Since I cannot recompile VLC myself, I would really apprechiate if you could remove this breakpoint from the precompiled ActiveX - I'm sure other developers will agree with me on that ;)

Thanks!
Jessica

Posted: 18 Dec 2005 14:33
by Quovodis
they are no static breakpoints in VLC, however the interruption could be attributed to some incompatibilties between VLC and the programming language you are using, could you be a more detailed on your problem ?

moreover, you could enable the logger interface by setting it up in the preferences panel of VLC player; the activex control will re-use any saved settings, this could help you see what VLC is doing

Posted: 18 Dec 2005 20:25
by Jess'ca
Dear Quovodis,

thanks for your comment. I now found out how to bypass this problem:

Im im using Delphi 7. The problem does NOT seem to be related to VLC in particular.

Microsoft indeed seems to have forgotten a few DbgBreakPoint in ntdll. For other stuggling developers, here is the workaround:

procedure PatchINT3;
var
NOP : Byte;
NTDLL: THandle;
BytesWritten: DWORD;
Address: Pointer;
begin
if Win32Platform <> VER_PLATFORM_WIN32_NT then Exit;
NTDLL := GetModuleHandle('NTDLL.DLL');
if NTDLL = 0 then Exit;
Address := GetProcAddress(NTDLL, 'DbgBreakPoint');
if Address = nil then Exit;
try
if Char(Address^) <> #$CC then Exit;

NOP := $90;
if WriteProcessMemory(GetCurrentProcess, Address, @NOP, 1, BytesWritten) and
(BytesWritten = 1) then
FlushInstructionCache(GetCurrentProcess, Address, 1);
except
//Do not panic if you see an EAccessViolation here, it is perfectly harmless!
on EAccessViolation do ;
else raise;
end;
end;

initialization


if DebugHook<>0 then
PatchINT3;

end.


Cheers,
jessica