Discussion:
WMI Scripting Library; Compiling with EARLY bindinng
(too old to reply)
Howard Kaikow
2009-04-21 12:45:54 UTC
Permalink
If I want to use EARLY binding, can I compile a VB 6 program using, say, WMI
Scripting Library 1.2, but still have the program run on a system that has
only version 1.1, provided that I do not use features in 1.2, not present in
1.1?
Howard Kaikow
2009-04-21 14:15:07 UTC
Permalink
No
Thanx, that's what I thought.
But you can Early Bind with version 1.1 and use it with machines with 1.2
installed.
I'm doing that now, but was planning for the day when I no longer had
systems with 1.1.

In that case, I guess that I'll have to use, ugh!, LATE binding.
Ralph
2009-04-21 18:24:01 UTC
Permalink
Post by Howard Kaikow
No
Thanx, that's what I thought.
But you can Early Bind with version 1.1 and use it with machines with 1.2
installed.
I'm doing that now, but was planning for the day when I no longer had
systems with 1.1.
In that case, I guess that I'll have to use, ugh!, LATE binding.
In general Early Binding does improve performance. But don't despair yet. Do
some testing on an actual system, and isolate those specific areas where
your application is experiencing delays.

Many of the sub-services that are accessed through WMI are not know as
"speedy" nor enjoy priority status. Clear differences on a test box often
become blurred when tested in a production environment. ie, you might not be
as bad off as you think. (Of course I know squat about your specific
environment or what you are doing.)

For those areas where performance is a serious problem - then provide a
separate component that uses Early Binding. Later as your service
requirements change then reverse the process.

-ralph
Howard Kaikow
2009-04-21 18:57:14 UTC
Permalink
Speed is not an issue.
My religion precludes me from using late binding where early binding will
work.

As we speak, I copied the project to a Vista system and compiled usung WMI
1.2 in Vista.
The copied the .exe back to Windows 2000.
The .exe worked in Windows 2000.

I'm ising just:

GetObject("winmgmts:\\.\root\cimv2").ExecQuery( _
"Select Name, CurrentUsage, PeakUsage, " & _
"AllocatedBaseSize from Win32_PageFileUsage", , 48)

GetObject("winmgmts:\\.\root\cimv2").ExecQuery( _
"Select Name, InitialSize, MaximumSize from
Win32_PageFileSetting", , 48)

Ralph
2009-04-21 13:38:46 UTC
Permalink
Post by Howard Kaikow
If I want to use EARLY binding, can I compile a VB 6 program using, say, WMI
Scripting Library 1.2, but still have the program run on a system that has
only version 1.1, provided that I do not use features in 1.2, not present in
1.1?
No

But you can Early Bind with version 1.1 and use it with machines with 1.2
installed.

-ralph
Loading...