Dispatch variable newbie question...
I am using a DISPATCH variable to access an ActiveX DLL's properties and methods. I'd like to validate that the DLL is properly installed and registered before calling any of the properties/methods.
Can I use the IsObject function to validate a DISPATCH variable?
TIA
Yes, of course.
Thanks Jose. Coming from a VB background alot of these concepts are new to me. VB has objects but we never have to explicitly deal with or be aware of Dispatch variables and neither the PB or FF documentation seemed to address this.
Trial and error testing seemed to show that IsObject could work with a Dispatch variable but I was looking for something more definitive.
Thanks again
The real difference between object and dispatch variables is that object variables are used for early binding and dispatch variables for late binding. If you use object variables you have to make an interface with the PB COM browser, that the compiler uses to retrieve the DispID at compile time to construct the call to Invoke. With dispatch variables, the compiler adds a call to GetIDsOfNames, that retrieves the DispID at runtime.