|
-
March 31st, 2004, 08:02 AM
#1
ATL full control
Using VC++ 6, I created an ATL exe server and then added a "full control" to it. On this control I chose to "implement connection points" and left everything else as default. I finally added a simple public method to make the speaker beep.
I then compiled it and saw that it was registered okay.
First question: based on all the defaults so far in the ATL wizard, is that registering process (at the end of compiling) the same as taking the resulting exe and typing
C:\> MY_ATL_EXE /REGSERVER
I then loaded VB and created a simple exe client. In the VB IDE I browsed for components and added MY_ATL_EXE control to the toolbar. It appeared on the toolbar but on trying to drop it on the form, an error message informed me that the "class" was not registered.
I then took just the atl exe and registered it on another machine. My understanding is that COM is location independant and therefore an activeX control hosted in an atl exe server should be able to run on a remote pc. Is this right?
After registering it I could see it in oleview and the activeX test container, from where I was able to call my beep method. But when I tried to use it from VB, I could only see it in the references dialog as a type library. I could not find it while browsing for components to add to the toolbar.
It was registered okay as a couple of lines of VB managed to call my beep method. It's just that I'm trying to understand why it didn't behave as an activeX control properly on either machine (and the behaviour was different on both machines) as far as VB went.
Thanks
Phil.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|