August 26, 2000

Building a Better Mousetrap for COM+ (MTS)

couple of months back, I took it upon myself to clean up the VB Sample Bank code. The original goal was to modify the code just enough to use the objects in scalability tests to compare it against pooled objects written in VC++ and Delphi 5. However, once I opened

GetHiddenClasses – Retrieve all the hidden classes in a type library

‘ Return a collection with all hidden types of a type library” VB’s Object Browser hides some types in a type library:’ you can show these types by right clicking on the Object Browser and’ activating the “Show hidden members” option. This option, however,’ shows only types labelled as “hidden”,

GetMemberType – Check whether an object exposes a property, method, event

‘ Returns a bit-coded value that specifies the type of’ an object’s member (property, method, event)’ or zero if the member isn’t there’ Object is the object which you want to work’ MemberName is the property, method or event name” the return value is one of the following’ INVOKE_FUNC (method)’

GetClassesByInterface – Retrieve all the classes that implement a given interface

‘ Return all classes of the type library specified in’ TypeLibFile parameter that support a certain interface.’ the interface can be specified as an Object or through its IID’ Be sure that “TypeLib Information” type library (TlbInf32.tlb)’ is referenced in your VB project.Function GetClassesByInterface(ByVal TypeLibFile As String, _ ObjectOrInterfaceIID As

GetClasses – Enumerate all the classes defined in a type library

‘ Return a collection with all creatable classes of’ the type library specified in TypeLibFile.” Set IncludeNotCreatableClasses = True to include not creatable classes’ (that is, those with Instancing property set to PublicNotCreatable) too.’ Be sure that “TypeLib Information” type library (TlbInf32.tlb)’ is referenced in your VB project.Function GetClasses(ByVal TypeLibFile

GetObjectGUID – Retrieve the GUID of a COM object

‘ Return the GUID of the object specified in the first parameter’ Be sure that “TypeLib Information” type library (TlbInf32.tlb)’ is referenced in your VB project.Function GetObjectGUID(Object As Object) As String Dim TLI As New TLIApplication ‘ any error will be raised by TLI GetObjectGUID = TLI.InterfaceInfoFromObject(Object).GuidEnd Function

GetProcID – Retrieve the DispID of a procedure

‘ Return the DispID of a procedure’ ProcName must be set to a procedure name of the object’ specified in the second parameter.’ Be sure that “TypeLib Information” type library (TlbInf32.tlb)’ is referenced in your VB project.Function GetDispID(Object As Object, ByVal ProcName As String) As Long Dim TLI As New

Layout Manager for Scrolling DIV’s

A scrolling DIV is a great way to display a large amount of data without resorting to frames. Setting the CSS-2 OVERFLOW property to auto will make the DIV into an independently scrolling container when either the HEIGHT or WIDTH property also is specified: This is great, but how do

No more posts to show