Click to See Complete Forum and Search --> : discovering dependencies from an EXE file
Filipo Novo Mór
07-13-2001, 03:37 PM
Hi, all!
I need to discover the dependencies for an EXE file. In another words,
what I need to know is which files are being used by one compiled app (if
I haven't the source code). If is it possible, I would like to check a whole
directory (something seeams to 'GREP' behavior).
Any help will be very appreciated!
Filipo
Steve Berzins
07-13-2001, 03:45 PM
I don't know if it comes with just VB6, but if you have visual studio
in the menu under Visual Studio 6.0 Tools there is a program called Depends
that does just what I think you're after, for a single exe or dll anyways,
I don't think it will check more than one at time though.
Steve
"Filipo Novo Mór" <fmor@terra.com.br> wrote in message
news:3b4f3fd8$1@news.devx.com...
>
>
> Hi, all!
>
> I need to discover the dependencies for an EXE file. In another words,
> what I need to know is which files are being used by one compiled app (if
> I haven't the source code). If is it possible, I would like to check a
whole
> directory (something seeams to 'GREP' behavior).
>
> Any help will be very appreciated!
>
> Filipo
>
Willy Van den Driessche
07-13-2001, 05:22 PM
"Steve Berzins" <steveberzins@NOSPAMhotmail.com> wrote in message
news:3b4f4331@news.devx.com...
> I don't know if it comes with just VB6, but if you have visual studio
> in the menu under Visual Studio 6.0 Tools there is a program called
Depends
> that does just what I think you're after, for a single exe or dll anyways,
> I don't think it will check more than one at time though.
>
> Steve
The dependency check just shows you the 'linked' dependencies.
I am now aware of a tool that shows dependencies on activeX servers (OCX,
EXE, or DLL). You could inspect the typelib with OleView (also in tools),
but that would only show the public dependencies. For private dependencies
I wouldn't have a clue. - Willy.
mrfelis
07-13-2001, 07:41 PM
> "Steve Berzins" <steveberzins@NOSPAMhotmail.com> wrote in message
> news:3b4f4331@news.devx.com...
> > Steve
> The dependency check just shows you the 'linked' dependencies.
> I am now aware of a tool that shows dependencies on activeX servers (OCX,
> EXE, or DLL). You could inspect the typelib with OleView (also in
tools),
Depends allows you to see all the libraries loaded by an EXE. Press F5 to
start profiling.
--
~~~
!ti timda I ,KO
..em deppals nocaeB sivaM
!draH
~~
C'Ya,
mrfelis@yahoo!com
Willy Van den Driessche <Willy.Van.denDriessche@skynet.be> wrote in message
news:3b4f56aa$1@news.devx.com...
>
>
George Lissauer
07-14-2001, 12:52 AM
Try Reveal at http://www.addisonsw.com/
....
George
GridLinx Software Programming Tools for VB Programmers
http://www.gridlinx.com
Filipo Novo Mór wrote in message <3b4f3fd8$1@news.devx.com>...
>
>
> Hi, all!
>
> I need to discover the dependencies for an EXE file. In another words,
>what I need to know is which files are being used by one compiled app (if
>I haven't the source code). If is it possible, I would like to check a
whole
>directory (something seeams to 'GREP' behavior).
>
> Any help will be very appreciated!
>
> Filipo
>
Filipo Novo Mór
07-16-2001, 09:50 AM
Hi, Willy!
Would you give us a quick explain about what are the differences between
public, private and ActiveX dependencies?
Thanks!!!
Filipo
"Willy Van den Driessche" <Willy.Van.denDriessche@skynet.be> wrote:
>
>"Steve Berzins" <steveberzins@NOSPAMhotmail.com> wrote in message
>news:3b4f4331@news.devx.com...
>> I don't know if it comes with just VB6, but if you have visual studio
>> in the menu under Visual Studio 6.0 Tools there is a program called
>Depends
>> that does just what I think you're after, for a single exe or dll anyways,
>> I don't think it will check more than one at time though.
>>
>> Steve
>The dependency check just shows you the 'linked' dependencies.
>I am now aware of a tool that shows dependencies on activeX servers (OCX,
>EXE, or DLL). You could inspect the typelib with OleView (also in tools),
>but that would only show the public dependencies. For private dependencies
>I wouldn't have a clue. - Willy.
>
>
Willy Van den Driessche
07-16-2001, 05:02 PM
"Filipo Novo Mór" <fmor@terra.com.br> wrote in message
news:3b52e32b$1@news.devx.com...
>
>
> Hi, Willy!
>
> Would you give us a quick explain about what are the differences between
> public, private and ActiveX dependencies?
>
> Thanks!!!
>
> Filipo
>
>
1) Public dependencies
Public dependencies occur when you use a type in a public function that is
defined in another activeX (DLL, EXE, TypeLib). Since users of your activeX
must be able to use your activeX, there will be a reference inside your
typelib to the other typelibrary (which happens to be inside an EXE, OLB,
TLB, DLL, ...) For those who know C or C++, the simplest to understand this
is that you look at a typelibrary as some kind of binary include file (.h.,
..hpp). If you use another typelibrary (include file) in your typelibrary,
then it will be included in the header.
consider this code:
Public Class MyClass In MyDLL
Public sub useYourClass (byval objYourClass as YourDLLProgID.YourClass)
end sub
In this case the typelibrary in myDLL will have to contain a reference to
yourDLL. You can find these references by walking the typelibrary in your
DLL with the TypelibInfo library from microsoft (for which help is
downloadable from Microsoft, the help is not installed with VB).
Note that for these 'dependencies' to be found, you need to create an
activeX thing. IMHO Standard EXE don't contain typelibraries. There is no
need for that since they don't expose objects to be used by other
applications.
Note too that 'public' means at least a class that is publicNotCreateable
(or MultiUse of GMU)
2) Private dependencies
If your classes use another activeX thing, but only for the implementation
and not in any of the public methods, then no reference to that typelibrary
will be added to your typelibrary. Your DLL is still dependent on the
thing, but it won't show up in the typelibrary. The idea is that it is
possible to change the implementation of your activeX dll, without any of
client applications having to worry about it. Perhaps a new implementation
might not even need the reference anymore, you will never know by inspecting
your typelibrary.
With the include file parallel, the other header will not occur in the
..c/.cpp file.
3) Runtime dependencies
As a special case of private dependencies there are 'runtime dependencies'.
If your code uses CreateObject ("aaa.bbb") and late binding, there is
absolutely nothing that can tell this dependency. As far as VB is concerned
the "aaa.bbb" string might be read from an INI file, so it can impossibly
tell you what the dependencies are. (Runtime dependencies are not restricted
to activeX things, they can also occur when your code does a LoadLibrary,
GetProcAddress)
4) Linked dependencies
If your code use a declare statement from another non-activeX DLL, then
"depends"(the tool) will show a "dependency" between your file and the other
DLL. Before activeX this was THE way to reuse code in other DLLs. In most
VB code this is rather rare and therefore most VB executables only have a
reference to MSVBVM60.DLL. This reference is introduced without your
knowledge by the VB compiler. (Given the size of the DLL an the multitude of
VB programs, I guess this is a good thing.)
Linked and public dependencies are the only things you can be sure of when
searching for dependencies. All the rest comes from documentation or DEP
files (search your windows directory to find some of these)
I hope this is a little clearer ? - Willy.
> "Willy Van den Driessche" <Willy.Van.denDriessche@skynet.be> wrote:
> >
> >"Steve Berzins" <steveberzins@NOSPAMhotmail.com> wrote in message
> >news:3b4f4331@news.devx.com...
> >> I don't know if it comes with just VB6, but if you have visual studio
> >> in the menu under Visual Studio 6.0 Tools there is a program called
> >Depends
> >> that does just what I think you're after, for a single exe or dll
anyways,
> >> I don't think it will check more than one at time though.
> >>
> >> Steve
> >The dependency check just shows you the 'linked' dependencies.
> >I am now aware of a tool that shows dependencies on activeX servers (OCX,
SHOULD HAVE BEEN NOT, of course.
> >EXE, or DLL). You could inspect the typelib with OleView (also in
tools),
> >but that would only show the public dependencies. For private
dependencies
> >I wouldn't have a clue. - Willy.
> >
> >
>
devx.com
Copyright WebMediaBrands Inc. All Rights Reserved