Click here to Skip to main content
11,928,605 members (51,576 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB6 ActiveX
I have created an application in using com class ,
so that i can use that dll in vb6 application

<ComClass(ComClass1.ClassId, ComClass1.InterfaceId, ComClass1.EventsId)> _
Public Class ComClass1
#Region "COM GUIDs"
    ' These  GUIDs provide the COM identity for this class
    ' and its COM interfaces. If you change them, existing
    ' clients will no longer be able to access the class.
    Public Const ClassId As String = "23520cb2-aa3a-431a-b87e-bb23ad6c0c42"
    Public Const InterfaceId As String = "c6d19f7e-8184-4c6c-b799-8f086a8ab04e"
    Public Const EventsId As String = "5bd8aa70-44ba-4f56-a3c8-fc9bca0befdf"
#End Region

    ' A creatable COM class must have a Public Sub New()
    ' with no parameters, otherwise, the class will not be
    ' registered in the COM registry and cannot be created
    ' via CreateObject.
    Public Sub New()
    End Sub
    Public Function subt(ByVal a As Integer, ByVal b As Integer)
        Return a - b
    End Function
End Class

This Dll is used as a reference in vb6 application

if i give the reference dll in vb6 application it is working fine with my system environment but if i try to run that exe in other system then it is throwing me the error as

activex component can't create object

Thanks in advance
Pavan R
Posted 15-Jun-12 0:29am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You have to deploy that dll also on the other system, and that means that you also have to register (regsrv32) it.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Thanks Bernhard Hiller

But can you let me know how to use the dll in other different system without registering the DLL .

Thanks in advance
Pavan R
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Could you help me how to register a .net DLL using regasm through code in vb6

Thanks in advance..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 16 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100