Google Answers Logo
View Question
 
Q: Internet ActiveX Controls ( No Answer,   1 Comment )
Question  
Subject: Internet ActiveX Controls
Category: Computers > Programming
Asked by: code_blazer-ga
List Price: $20.00
Posted: 14 Aug 2003 14:49 PDT
Expires: 20 Aug 2003 18:49 PDT
Question ID: 244883
Using Visual C++ 6, what is the easiest way to build a bare bones
ActiveX control that can be embedded in a web page?  I don't need info
on how to script it from the web page.  I just need to know how to
generate the C++ code to build it.

It is unclear to me how to do this from any of the available wizards
and I can't understand why every tech book or MSDN article I pick up
which talks about ActiveX controls requires 3 chapters or 100 pages of
howto material when I can create a normal ATL COM object in 10 seconds
with a wizard.  I just want to be able to distribute some code through
the browser.

Request for Question Clarification by mathtalk-ga on 15 Aug 2003 08:10 PDT
Hi, code_blazer-ga:

Although you ask about the "easiest way to build a bare bones ActiveX
control" with VC++ 6 (presumably to use from a client-side script
under IE), I suspect the heart of your question is either about
implementing some specific functionality or about downloading and
"registering" the component from within the browser.

I can provide links to building controls with automation interfaces,
which in a narrow sense addresses your question, but I'm seeking
clarification that this is what you want before proceeding.  See my
comment below for a bit more on the subject.

regards, mathtalk-ga

Clarification of Question by code_blazer-ga on 17 Aug 2003 10:40 PDT
Yes, you are correct in that I simply want to create an activex
control that self-registers and doesn't do anything really.  For
example, it could just throw up a dialog box.  I see that when I try
to add a control to the ATL COM object wizard, there are 2 things that
I'm guessing look like they may be relevant: the HTML control and the
HTML lite control.  I need to know which one, if either, i should
choose and which interfaces are important for understanding how to
develop an internet ActiveX control.  I'm already quite familiar with
how to develop a "simple" ATL COM object.  Thanks.

Request for Question Clarification by mathtalk-ga on 18 Aug 2003 08:01 PDT
Hi, code_blazer-ga:

In building ATL COM objects have you had occasion to edit the IDL
files that the wizard produces for you?  I suspect this may be the
missing ingredient.

Under VC++ 6.0 the ATL wizard assigns some constant values for the
DISP_ID associated with the dispatch interface, but what is really
needed for automation are some "enumerations" that (at runtime) will
allow the COM initialization of the object to be in synch with these
interfaces.

I'm planning to provide some links to simple projects that illustrate
what you want (compiling simple ATL COM "servers" that can be
instantiated and used from within a client-side Web page), but it
would help me to fine tune my write-up if I knew a little about your
experience with IDL.

My impression is that one of the key improvements to ATL within the
Visual Studio .Net IDE is that the ATL component wizard now does a
more complete job of constructing the automation interfaces.  However
I realize that you are only interested in what can be done with the
VC++ 6.0 wizard, and my answer will be limited to that subject.

regards, mathtalk-ga

Clarification of Question by code_blazer-ga on 18 Aug 2003 10:17 PDT
yes, i've worked with IDL files quite a bit.  again, i'm interested to
know what interfaces the object needs beyond what a simple object with
a custom interface has.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Internet ActiveX Controls
From: mathtalk-ga on 15 Aug 2003 07:39 PDT
 
Hi, code_blazer-ga:

In principle the only "special" aspect of compiling a COM/ActiveX
control that can be (client-side) scripted from a Web page is that it
needs to support the necessary automation interfaces.

In practice one needs to think through the security/permissions issues
and address what "ambient" properties the control may require from the
"containing" Web page/browser.

Your statement, "I just want to be able to distribute some code
through the browser," could suggest that you want to be able to
download the ActiveX control through the browser and have it perform
the essential registry operations for future use.  Such a question is
a bit beyond the rather straightforward requirements for VC++
compilation.

Or perhaps you are thinking of building a control whose function is to
mediate downloading code (source or binary) from a Web site?

regards, mathtalk-ga

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy