Hi Genius.........
i have struggled with some problems please help me


m creating a COM component Instance like this for supporting multiple version of COM components

Creating Instance Code:
  1. Private _cmObjct As Object
  2.     Public Property CreatingInstances() As Object
  3.         Get
  4.             Dim _typePs As Type = Type.GetTypeFromProgID("SecureTronics.Application")
  5.             If Not _typePs Is Nothing Then
  6.                 If _cmObjct Is Nothing Then _cmObjct = Activator.CreateInstance(Type.GetTypeFromProgID("SecureTronics.Application"))
  7.             End If
  8.             Return _cmObjct
  9.         End Get
  10.         Set(ByVal value As Object)
  11.             _cmObjct = value
  12.         End Set
  13.     End Property

it's really fine to working me with multiple versions.



but this component have some Multiple Interfaces...,Properties...,Methods...,Classes... and so on...

what my question is if i reference this dll file i can declare a variable with this component Interface
like

Declare with Referenced Dll Code:
  1. Dim _ssdObj as SecureTronics.SSDP

at the same time how to declare this method without referenced dll

SSDP is an interface so how to declare this interface for my usage
is this Correct ...?

Error: Code:
  1. Dim d as Object = Activator.CreateInstance(Type.GetTypeFromProgID("SecureTronics.SSDP"))