Ask a Question related to ASP Components, Design and Development.
-
Brett Robichaud #1
Using MFC ActiveX control in ASP
I'm using VS.Net 2003 to create a very simple ActiveX control in MFC. The
control has no ui and just a few properties and methods.
What do I need to do to make it work in a classic ASP page? Currently any
time I try to set a property on my control {after calling 'Set obj =
Server.CreateObject(...)'} I get this error:
Error Type: (0x8000FFFF) Catastrophic failure
I can successfully use my control from a C# Winforms app.
What am I missing?
-Brett-
Brett Robichaud Guest
-
ActiveX Control in C#
Hi, I am trying to create a program similar to the BasicIacOCXCS sample. I have tried to look though the IACRefrence pdf but haven't been able to... -
Help with Activex control
:I try to build a web site with flash pictures. The problem is this activex control yellow bar that users might not want to click on when visiting... -
User Control and ActiveX control
Now I am hosting a user control(an assembly in .dll) in IE. I want to know the difference between this kind of control and ActiveX control. thank... -
develop activex control in c# .net
Hi, I've read the article on “Writing an ActiveX Control in .NET” from c-sharpcorner.com and have succeeded in creating the simple textbox... -
HELP: ActiveX Control on webform
I am going to use an ActiveX control on my webform. 1. How can I set it up so that if a user views the web page and doesn't have the ActiveX... -
Kathy #2
Re: Using MFC ActiveX control in ASP
> What do I need to do to make it work in a classic ASP page?
It needs a standard COM and/or an IDispatch interface. Does it have that?
- Kathy
Kathy Guest
-
Brett Robichaud #3
Re: Using MFC ActiveX control in ASP
It does have an IDispatch interface. Here is the IDL:
// SimX.idl : type library source for ActiveX Control project.
// This file will be processed by the MIDL compiler tool to
// produce the type library (SimX.tlb) that will become a resource in
// SimX.ocx.
#include <olectl.h>
#include <idispids.h>
[ uuid(B879589D-FE5D-4602-AEA3-563546B8ACA0), version(1.0),
helpfile("SimX.hlp"),
helpstring("SimX ActiveX Control module"),
control ]
library SimXLib
{
importlib(STDOLE_TLB);
// Primary dispatch interface for CSimXCtrl
[ uuid(7FE57EC8-590F-416E-9842-829258C6A376),
helpstring("Dispatch interface for SimX Control")]
dispinterface _DSimX
{
properties:
[id(1), helpstring("property Prop1")] LONG Prop1;
[id(2), helpstring("property Prop2")] LONG Prop2;
methods:
};
// Event dispatch interface for CSimXCtrl
[ uuid(5D27723A-5B39-4E99-BAE5-04CD9B5225A4),
helpstring("Event interface for SimX Control") ]
dispinterface _DSimXEvents
{
properties:
// Event interface has no properties
methods:
};
// Class information for CSimXCtrl
[ uuid(F3BCCE44-7CFB-47CE-BCFF-88C676FD3B28),
helpstring("SimX Control"), control ]
coclass SimX
{
[default] dispinterface _DSimX;
[default, source] dispinterface _DSimXEvents;
};
};
This is from a plain-jane MFC activeX control. I must be doing something
simple wrong.
"Kathy" <i_luv_usenet@munged.yahoo.nospam.com> wrote in message
news:%23PSQy%23kpEHA.3592@TK2MSFTNGP09.phx.gbl...>> > What do I need to do to make it work in a classic ASP page?
> It needs a standard COM and/or an IDispatch interface. Does it have that?
>
> - Kathy
>
>
Brett Robichaud Guest
-
Brett Robichaud #4
Re: Using MFC ActiveX control in ASP
I figured this out. Turns out to use a basic MFC ActiveX control in ASP you
need to override IsInvokeAllowed() and return TRUE.
Man I hate it when the answer is some subtle little thing like this. I just
blew 5 hrs trying to figure this out before I found the kb article Q146120.
Argh. I was just on the verge of re-writing it in ATL.
-Brett-
"Brett Robichaud" <brettrobichaud@nospam.yahoo.com> wrote in message
news:%23%23oOOElpEHA.1152@TK2MSFTNGP11.phx.gbl...that?> It does have an IDispatch interface. Here is the IDL:
> // SimX.idl : type library source for ActiveX Control project.
> // This file will be processed by the MIDL compiler tool to
>
> // produce the type library (SimX.tlb) that will become a resource in
>
> // SimX.ocx.
>
> #include <olectl.h>
>
> #include <idispids.h>
>
> [ uuid(B879589D-FE5D-4602-AEA3-563546B8ACA0), version(1.0),
>
> helpfile("SimX.hlp"),
>
> helpstring("SimX ActiveX Control module"),
>
> control ]
>
> library SimXLib
>
> {
>
> importlib(STDOLE_TLB);
>
> // Primary dispatch interface for CSimXCtrl
>
> [ uuid(7FE57EC8-590F-416E-9842-829258C6A376),
>
> helpstring("Dispatch interface for SimX Control")]
>
> dispinterface _DSimX
>
> {
>
> properties:
>
> [id(1), helpstring("property Prop1")] LONG Prop1;
>
> [id(2), helpstring("property Prop2")] LONG Prop2;
>
> methods:
>
> };
>
> // Event dispatch interface for CSimXCtrl
>
> [ uuid(5D27723A-5B39-4E99-BAE5-04CD9B5225A4),
>
> helpstring("Event interface for SimX Control") ]
>
> dispinterface _DSimXEvents
>
> {
>
> properties:
>
> // Event interface has no properties
>
> methods:
>
> };
>
> // Class information for CSimXCtrl
>
> [ uuid(F3BCCE44-7CFB-47CE-BCFF-88C676FD3B28),
>
> helpstring("SimX Control"), control ]
>
> coclass SimX
>
> {
>
> [default] dispinterface _DSimX;
>
> [default, source] dispinterface _DSimXEvents;
>
> };
>
> };
>
> This is from a plain-jane MFC activeX control. I must be doing something
> simple wrong.
>
> "Kathy" <i_luv_usenet@munged.yahoo.nospam.com> wrote in message
> news:%23PSQy%23kpEHA.3592@TK2MSFTNGP09.phx.gbl...> >> > > What do I need to do to make it work in a classic ASP page?
> > It needs a standard COM and/or an IDispatch interface. Does it have>> >
> > - Kathy
> >
> >
>
Brett Robichaud Guest



Reply With Quote

