Board index » cppbuilder » Regsvr32.exe Page Fault

Regsvr32.exe Page Fault

I created an ActiveX library with BCB4 and have now moved the project
into BCB5.  The project compiles and runs fine.  However, when I
register the dll using REGSVR32.EXE it displays a window saying the dll
was sucessfully registered, then immediately generates a page fault in
module <unknown> at 00de:00ae18ec.

After that, the dll seems to work fine.  I've tried it on several
computers running Win98 and get the same result.  Registering from
inside of BCB environment has the same problem, both BCB4 and BCB5.

Thanks for any assistance,

Jeff Hupp

 

Re:Regsvr32.exe Page Fault


In article <38F2484F.76F22...@quatech.com>,
Jeff Hupp  <jh...@quatech.com> wrote:

Quote
>I created an ActiveX library with BCB4 and have now moved the project
>into BCB5.  The project compiles and runs fine.  However, when I
>register the dll using REGSVR32.EXE it displays a window saying the dll
>was sucessfully registered, then immediately generates a page fault in
>module <unknown> at 00de:00ae18ec.

>After that, the dll seems to work fine.  I've tried it on several
>computers running Win98 and get the same result.  Registering from
>inside of BCB environment has the same problem, both BCB4 and BCB5.

It would; the problem is probably coming from somewhere inside the
DLLRegisterServer function.

What I would do to track down what's causing the page fault is:

(1) write a small shell .exe which loads your .ocx and calls
DllRegisterServer.

(2) Set a module load breakpoint on your .ocx, in the de{*word*81},
and then run the shell .exe.

(3) when you hit the module load breakpoint, add a breakpoint at the
DllRegisterServer code in your .ocx project, and then run to it.

(4) Step through to the problem.

Quote

>Thanks for any assistance,

>Jeff Hupp

--
Si vales, valeo.

Re:Regsvr32.exe Page Fault


Quote
aphr...@magescave.blackforest.org (Robert West) wrote:
>(1) write a small shell .exe which loads your .ocx and calls
>DllRegisterServer.

Actually, there's a system utility known as regsvr32.exe that does
exactly that :-)

That's what I use when my registration code goes doolally.

Alan Bellingham
--
al...@episys.com  
For book reviews and much more, see the Association of C and C++ Users
website at http://www.accu.org

Re:Regsvr32.exe Page Fault


In article <38f544ac.505959...@forums.borland.com>,

Quote
Alan Bellingham <al...@episys.com> wrote:
>aphr...@magescave.blackforest.org (Robert West) wrote:

>>(1) write a small shell .exe which loads your .ocx and calls
>>DllRegisterServer.

>Actually, there's a system utility known as regsvr32.exe that does
>exactly that :-)

Sure. But if you're trying to *debug DllRegisterServer*, which it
looked like he was trying to do, then it helps to have your own. :)
--
Si vales, valeo.

Re:Regsvr32.exe Page Fault


Quote
aphr...@magescave.blackforest.org (Robert West) wrote:
>In article <38f544ac.505959...@forums.borland.com>,
>Alan Bellingham <al...@episys.com> wrote:

>>Actually, there's a system utility known as regsvr32.exe that does
>>exactly that :-)

>Sure. But if you're trying to *debug DllRegisterServer*, which it
>looked like he was trying to do, then it helps to have your own. :)

_debug_ DllRegisterServer()? Why didn't you say?

OK, the method of debugging DllRegisterServer I use is as follows:

1) Load the OCX project in BCB
2) Set a breakpoint on DllRegisterServer()
3) Set the host application to *TADA* regsvr32.exe
4) Start running

(It's standard DLL debugging techniques. Most of my OCX debugging uses
VB client apps simply becuase they're quick and dirty hacks that don't
eat huge amounts of disk.)

Alan Bellingham
--
al...@episys.com  
For book reviews and much more, see the Association of C and C++ Users
website at http://www.accu.org

Re:Regsvr32.exe Page Fault


In article <38f6a001.71084...@forums.borland.com>,

Quote
Alan Bellingham <al...@episys.com> wrote:
>>Sure. But if you're trying to *debug DllRegisterServer*, which it
>>looked like he was trying to do, then it helps to have your own. :)

>_debug_ DllRegisterServer()? Why didn't you say?

I thought it was obvious from the context of the message I was
responding to. :)

Quote
>(It's standard DLL debugging techniques. Most of my OCX debugging uses
>VB client apps simply becuase they're quick and dirty hacks that don't
>eat huge amounts of disk.)

Sure. It's pretty easy, though, to write an app which simply turns around
and calls DllRegisterServer; mine has been around for four years or so. :)

--
Si vales, valeo.

Re:Regsvr32.exe Page Fault


Quote
aphr...@magescave.blackforest.org (Robert West) wrote:
>Sure. It's pretty easy, though, to write an app which simply turns around
>and calls DllRegisterServer; mine has been around for four years or so. :)

Well, that's all regsvr32.exe does, too. (Well, it has a small amount of
command line processing.) I can understand if regsvr32 wasn't available.

Alan Bellingham
--
al...@episys.com  
For book reviews and much more, see the Association of C and C++ Users
website at http://www.accu.org

Re:Regsvr32.exe Page Fault


Jeff:

It almost sounds like a .DLL that your .OCX relies upon is {*word*89}.  Check
to
ensure that your DllEntryPoint has a minimal amount of code necessary for
registering the .OCX during DLL_PROCESS_ATTACH.  Otherwise, rename
your .OCX to a .DLL and use TDUMP.EXE against the renamed .DLL to
determine which .DLL's are imported by your .OCX.  Then during the actual
registration process (invoking regsvr32.exe), use a good de{*word*81} to
determine which .DLL is loaded at the address indicated by the page fault.
This should give you enough information to isolate the problem.

Hope this helps,
-Jim Rofkar.
jrof...@cros.net

P.S. - At my old job, in Twinsburg, we used to use Quatech data acquisition
boards.  How's Akron these days?

Quote
"Jeff Hupp" <jh...@quatech.com> wrote in message

news:38F2484F.76F221E3@quatech.com...
Quote
> I created an ActiveX library with BCB4 and have now moved the project
> into BCB5.  The project compiles and runs fine.  However, when I
> register the dll using REGSVR32.EXE it displays a window saying the dll
> was sucessfully registered, then immediately generates a page fault in
> module <unknown> at 00de:00ae18ec.

> After that, the dll seems to work fine.  I've tried it on several
> computers running Win98 and get the same result.  Registering from
> inside of BCB environment has the same problem, both BCB4 and BCB5.

> Thanks for any assistance,
> Jeff Hupp

Other Threads