Ask a Question

Using COM enabled dll classes from TC

Sandip_1
New Contributor

Using COM enabled dll classes from TC

Hi I have been trying to use some functions of a class encapsulated in a dll from within TC. The dll is COM enabled.I registered this dll and tried to create an instance of this using CreateObject but not being able to.



Need help on the same.
1 REPLY 1
siddhu
Contributor

RE: Using COM enabled dll classes from TC

Hi

    Try uisng 

    set ObjDll  =  OleObject(" ---Here comes Your DLL name.Class name----") 

    It will create an instance of it.

    You can use the functions of it.

    I think only Public functions are accessible.



In otherway you can try this also



    select Object Browser.

    You will find "OleObject" in the Properties section

    You will find Params button next to OleObject

    click on the Params button

    You will be asked for the OleObject & machine name

    Write your "Dll Name.Class name" at the Ole Object.

    leave the "Machine Name" column 

    click OK

    If it is registered.It will access the class in the DLL

    If it is not registered It will show an error message saying that "Invalid Class String : Can not Obtain Class ID "

    You will find a small button (with three small dots inside it) in the very right side of the OleObject row.

    click on that button

    Now you can access the properties and functions of the Class of  your DLL
cancel
Showing results for 
Search instead for 
Did you mean: