Protected Activex Exe

Hello
I have an ActiveX Exe file from Microsoft.
It has some kind of protection, so no one will be able to use it, just they.
when trying to add the Activex Exe to the references nothing happens.
so I looked into the register and found that this Activex Exe can be use.
so I tried this:

Option Explicit
Private MyObj

Private Sub Form_Load()
    Set MyObj = CreateObject("TheClass.Object.1")
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set Msn = Nothing
End Sub

doing that works fine, but how can I know the properties method or classing that this ActiveX Exe uses.
Is there any trick or tool out there to find something about this Activex Exe.
Dont forget the Microsoft uses some kind of proteccion, so when you try to use Object Browser nothing shows up
Thank you
StonedRaiderAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BandyConnect With a Mentor Commented:
If you've just added it to the "References" section then you won't see any effect, but the reference should be there.
(Project->References)

It'll only show up if it's a component.
(Project->Components)


Try adding the reference, and in the declarations section:

    Dim myClass As TheClass.Object1

and then in your form_load event

    Set myClass = New TheClass.Object1

Now when you type "myClass." a list of the properties/methods should show up.

Although, if M$ are being really protective of this object, then this may not work either, but it's worth a try.
0
 
Sashi RachabattulaSCRUM Master, .NET Project LeadCommented:
the sytax for createobject is

   Set MyObj = CreateObject(progid)
where projid is projectname.classname

0
 
BandyCommented:
Was that comment a reply to the way I declared / instantiated my objects, rsashi?

If it was, here's my explanation of my code.
If it wasn't just ignore me.

If any of this is incorrect, or i've misinterpreted the meaning of your comment, please let me know. (We're all hear to learn and improve, so any comments you want to make are appreciated.)

There's two methods for binding an object in VB (5/6 - I don't know about .net)

1. Early Binding - Where we declare, in the declaration of the variable, the type of object it is going to contain, as my example...

Dim myClass As TheClass.Object1
Set myClass = New TheClass.Object1

The benefit of this, is that when coding, you can get full information about the object via vb's inline hints (eg: List Properties/Methods), but to do this, you must have the reference added to the project, otherwise, when you try to run it, it can't find the object, and crashes.

2. Late Binding - Where we declare the variable to be of type "Object", and bind it to a specific type of object when it's initialized, as your example...

Dim MyObj as Object
Set MyObj = CreateObject(progid)

This means that you don't have to declare it as a specific type of object, and you can, at run time, check if that object type exists first, before using the CreateObject function. It also means, because you're not binding it at design time, you don't need to have the reference added to your project.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
StonedRaiderAuthor Commented:
Hello guys

Like I told you I have an ActiveX Exe from Microsoft.
It has some kind of proteccion because it does not allow
Early Binding, so I cant add the Activex Exe reference to my project.
so I tried Late Binding and it Worked!!!
The Activex Exe was created :), but my problem is that I dont know how to use it, because I dont have the properties, Methods from that activex.
so my questiond is how can I use it ?
Thank you
0
 
CleanupPingCommented:
StonedRaider:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
DanRollinsCommented:
Moderator, my recommended disposition is:

    Accept Bandy's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0
All Courses

From novice to tech pro — start learning today.