Home All Groups Group Topic Archive Search About

Dependency walker and custom ocx.

Author
12 Oct 2005 8:57 AM
MP
Hi
I've made a custom ocx, which amazingly enough seems to work.
:-0
I place an instance of it on a form in a std exe project.
I have registered the ocx via regsvr32.
the project is now compiled to an exe and I ran dependency walker to check
for files required since I plan to distribute this to a couple co-workers to
use so I wanted a list of what files I might need to install on their
machines to let it work.
I was surprised that the ocx file wasn't among the list.  I was imagining I
was going to have to copy it and register it on any machine using the app.
Does all that ocx magic just get wrapped up in the exe and magically work?
So registering a component is just a development phase requirement???

or does dw just not list custom ocx's?

Thanks
Mark

Author
12 Oct 2005 9:52 AM
Mike D Sutton
Show quote Hide quote
> I've made a custom ocx, which amazingly enough seems to work.
> :-0
> I place an instance of it on a form in a std exe project.
> I have registered the ocx via regsvr32.
> the project is now compiled to an exe and I ran dependency walker to check
> for files required since I plan to distribute this to a couple co-workers
> to
> use so I wanted a list of what files I might need to install on their
> machines to let it work.
> I was surprised that the ocx file wasn't among the list.  I was imagining
> I
> was going to have to copy it and register it on any machine using the app.
> Does all that ocx magic just get wrapped up in the exe and magically work?
> So registering a component is just a development phase requirement???
>
> or does dw just not list custom ocx's?

You will need to ship the OCX with your application.  If you are using
CreateObject() to reference objects in your custom OCX rather than adding it
as a reference to your EXE project then Dependency walker may not be picking
it up.
Hope this helps,

    Mike


- Microsoft Visual Basic MVP -
E-Mail: ED***@mvps.org
WWW: Http://EDais.mvps.org/
Author
12 Oct 2005 11:56 AM
Phill. W
"MP" <nospam@Thanks.com> wrote in message
news:0e43f.74$1A1.64@tornado.rdc-kc.rr.com...

> I've made a custom ocx, which amazingly enough seems to work.

Be surprised; be very, very surprised ... ;-)

> I place an instance of it on a form in a std exe project.
> I have registered the ocx via regsvr32.

/I'm/ surprised - that it worked that way round.  I'd expect that
you'd have to register it /before/ you can use it, but anyway ...

> the project is now compiled to an exe and I ran dependency
> walker to check for files required
> I was surprised that the ocx file wasn't among the list.

Dependency Walter works with native Windows-type
dependencies; it knows nothing whatever about COM
components that you might be using.

> I was imagining I was going to have to copy it and register it on
> any machine using the app.

You will. Or, at least, your Installation Package will.

As a starting point, look at the Package and Deployment Wizard
- it's basic, to be sure, but it's served me well in the past and /will/
locate the need for your OCX, /include/ it in the Package and install
and register it as your end-user installs it.

> Does all that ocx magic just get wrapped up in the exe and magically
> work?

Nope.

> So registering a component is just a development phase requirement?

Nope.

COM Components /have/ to be registered before you can use them,
because you access them either by GUID (Early Bound) or ProgID
(Late Bound), both of which require mapping, via the Registry, into
the physical location of the DLL.

HTH,
    Phill  W.
Author
12 Oct 2005 4:31 PM
MP
"Phill. W" <P.A.Ward@o-p-e-n-.-a-c-.-u-k> wrote in message
news:diit4d$8e6$1@yarrow.open.ac.uk...
> "MP" <nospam@Thanks.com> wrote in message
> news:0e43f.74$1A1.64@tornado.rdc-kc.rr.com...
>
> > I've made a custom ocx, which amazingly enough seems to work.
>
> Be surprised; be very, very surprised ... ;-)
>

I am! I Really am!!!

> > I place an instance of it on a form in a std exe project.
> > I have registered the ocx via regsvr32.
>
> /I'm/ surprised - that it worked that way round.  I'd expect that
> you'd have to register it /before/ you can use it, but anyway ...

You're right, I did both those things but not in that order
Show quoteHide quote
:-)


>
> > the project is now compiled to an exe and I ran dependency
> > walker to check for files required
> > I was surprised that the ocx file wasn't among the list.
>
> Dependency Walter works with native Windows-type
> dependencies; it knows nothing whatever about COM
> components that you might be using.
>
> > I was imagining I was going to have to copy it and register it on
> > any machine using the app.
>
> You will. Or, at least, your Installation Package will.
>
> As a starting point, look at the Package and Deployment Wizard
> - it's basic, to be sure, but it's served me well in the past and /will/
> locate the need for your OCX, /include/ it in the Package and install
> and register it as your end-user installs it.
>
> > Does all that ocx magic just get wrapped up in the exe and magically
> > work?
>
> Nope.
>
> > So registering a component is just a development phase requirement?
>
> Nope.
>
> COM Components /have/ to be registered before you can use them,
> because you access them either by GUID (Early Bound) or ProgID
> (Late Bound), both of which require mapping, via the Registry, into
> the physical location of the DLL.
>
> HTH,
>     Phill  W.
>
>

Thanks Phil, that's what I thought, just didnt' realize dw didn't know
custom ocx! :-)

I'll have to study up on pdw
Thanks
Mark
Author
12 Oct 2005 5:05 PM
Someone
> /I'm/ surprised - that it worked that way round.  I'd expect that
> you'd have to register it /before/ you can use it, but anyway ...

VB6 auto creates the registry entries on the development machine when you
compile an AcriveX component.



Show quoteHide quote
"Phill. W" <P.A.Ward@o-p-e-n-.-a-c-.-u-k> wrote in message
news:diit4d$8e6$1@yarrow.open.ac.uk...
> "MP" <nospam@Thanks.com> wrote in message
> news:0e43f.74$1A1.64@tornado.rdc-kc.rr.com...
>
>> I've made a custom ocx, which amazingly enough seems to work.
>
> Be surprised; be very, very surprised ... ;-)
>
>> I place an instance of it on a form in a std exe project.
>> I have registered the ocx via regsvr32.
>
> /I'm/ surprised - that it worked that way round.  I'd expect that
> you'd have to register it /before/ you can use it, but anyway ...
>
>> the project is now compiled to an exe and I ran dependency
>> walker to check for files required
>> I was surprised that the ocx file wasn't among the list.
>
> Dependency Walter works with native Windows-type
> dependencies; it knows nothing whatever about COM
> components that you might be using.
>
>> I was imagining I was going to have to copy it and register it on
>> any machine using the app.
>
> You will. Or, at least, your Installation Package will.
>
> As a starting point, look at the Package and Deployment Wizard
> - it's basic, to be sure, but it's served me well in the past and /will/
> locate the need for your OCX, /include/ it in the Package and install
> and register it as your end-user installs it.
>
>> Does all that ocx magic just get wrapped up in the exe and magically
>> work?
>
> Nope.
>
>> So registering a component is just a development phase requirement?
>
> Nope.
>
> COM Components /have/ to be registered before you can use them,
> because you access them either by GUID (Early Bound) or ProgID
> (Late Bound), both of which require mapping, via the Registry, into
> the physical location of the DLL.
>
> HTH,
>    Phill  W.
>
>
Author
12 Oct 2005 2:24 PM
Ken Halter
"MP" <nospam@Thanks.com> wrote in message
news:0e43f.74$1A1.64@tornado.rdc-kc.rr.com...
>
> or does dw just not list custom ocx's?
>
> Thanks
> Mark

If you want a tool that will show that OCX as a dependency, check this one
out.

Process Viewer  for Windows (freeware)
http://www.xmlsp.com/pview/prcview.htm

Just start the viewer, fire up your app, find it in the viewers list,
right-click, select Modules. Everything your app loads will be there. You
can export the list to CSV by hitting F2

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..
Author
12 Oct 2005 4:31 PM
MP
Show quote Hide quote
"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:ed3ihizzFHA.1168@TK2MSFTNGP15.phx.gbl...
> "MP" <nospam@Thanks.com> wrote in message
> news:0e43f.74$1A1.64@tornado.rdc-kc.rr.com...
> >
> > or does dw just not list custom ocx's?
> >
> > Thanks
> > Mark
>
> If you want a tool that will show that OCX as a dependency, check this one
> out.
>
> Process Viewer  for Windows (freeware)
> http://www.xmlsp.com/pview/prcview.htm
>
> Just start the viewer, fire up your app, find it in the viewers list,
> right-click, select Modules. Everything your app loads will be there. You
> can export the list to CSV by hitting F2

thanks as always!
Mark
Show quoteHide quote
:-)