ralph
6/9/2011 6:45:00 AM
On Wed, 08 Jun 2011 21:46:10 -0700, BeeJ <nospam@nowhere.com> wrote:
>In the .VBP file there is
>Reference=*\G{565783C6-CB41-11D1-8B02-00600806D9B6}#1.2#0#..\..\WINDOWS\system32\wbemdisp.tlb#Microsoft
>WMI Scripting V1.2 Library
>
>When I open the IDE Projects\References it shows
>C:\WINDOWS\system32\wbem\wbemdisp.tlb
>The .tlb is in that folder and not in the first path.
>
>It all compiles and the EXE runs fine.
>I can handle the, for this case, ..\..\ translation to C:>
>How does it work that the \vbem\ does not appear in the path in the
>.VBP file?
>If it all goes back to the registry, then what is the purpose of the
>path shown in the .VBP?
>
I'm not sure either - other than the Reference path often appears more
of a "hint" than deterministic. What you are observing is common. I
thought it was a simple matter of reducing the path string length in
the .vbp file. (.vbp files follow an .ini format, and way back when,
there were limitation in string lengths. But that is pure superstition
on my part.)
In some cases you can even edit the .vbp file and replace a Reference
path with a bogus one and the compile will work just fine. Other times
any tampering will lead to problems, or will be ignored and the
original 'hint' will be written back.
(For grins, correct the path or reregister the typelib in different
locations and see what happens.)
VB always reads the Registry with the GUID to obtain the true
location. This is seldom a problem except when one attempts to write a
utility to read the .vbp files. (That's how I found out about it. You
learn not to trust that path. <g>)
-ralph