VB.NET Automation

A

Andy

Hello,

I am trying to automate a game with VB.NET but I am having trouble doing so.
I have added a reference to the library (GameLib 1.0) and typed the
following code.

Dim A as Object
A = GetObject("","GameLib.Game")

but I always get an error saying unable to create activex control.
Apart from GameLib.Game there is also GameLib.GameClass and GameLib.IGame
I have used Spy++ to identify the window as an ATL window.

In the registry, neithier GameLib.Game/Class or IGame appears in
HKEY_CLASSES_ROOT/CLSID, is this where all automation ojects are stored?

I have tried reading tutorials on COM,VB and automation but I cant make
sense of them.
What do I need to do with library and class file so that I can automate the
program?

Thanks
Andy
 
M

Michael D. Ober

When you added the GameLib reference, the IDE should have created a new
class called GameLib for you. You need to reference this class instead of
the underlying COM object.

Mike Ober.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top