VLC ActiveX: Breakpoint in play-procedure - WHY?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Jess'ca

VLC ActiveX: Breakpoint in play-procedure - WHY?

Postby Jess'ca » 18 Dec 2005 01:13

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

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 18 Dec 2005 14:33

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

Jess'ca

Postby Jess'ca » 18 Dec 2005 20:25

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


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 6 guests