activex control inside atl dll - repost 
Author Message
 activex control inside atl dll - repost

Hi All,

I want to use an ActiveX control inside an ATL DLL.  The DLL's methods will
in turn call the OCX control
methods to do some work.

How can I do this?

Thanks in advance,
Arif.



Tue, 06 May 2003 03:00:00 GMT  
 activex control inside atl dll - repost
Give more information.
Is the ActiveX control implemented by the ATL DLL you're talking about ?
Are DLL methods DllGetClassobject, DllRegisterServer and so on ?

Frederic Claux



Quote:
> Hi All,

> I want to use an ActiveX control inside an ATL DLL.  The DLL's methods
will
> in turn call the OCX control
> methods to do some work.

> How can I do this?

> Thanks in advance,
> Arif.



Tue, 06 May 2003 03:00:00 GMT  
 activex control inside atl dll - repost
Hi Again,

Thanks Alexander for your response. Here'e the detailed scenario:

Frederic:
I have an old ocx file (don't know who wrote it and which tool
it was written in).  The purpose of the ocx is to do some business
processing i,e read/write data to SQL server based on some
business rules embedded in the ocx.

I need to use this ocx in another simple dll (not another control).
Actually the idea is to interface the ocx with another com component.
The component basically sends out a simple method call + parameters.
The way the ocx works is that you need to set its properties and
then call its methods in a predefined sequence.  I need to establish
this bridge. i,e translate the calls coming from another com component
to this ocx.

Let me try to clearify this.

1.  Component A sends out a message
2.  My component (lets call this Component B) will receive this
message, invoke the OCX and call the ocx methods based on the
message received by Component A.

So I need to wrap the OCX in my AT L DLL.  The ocx is invisible
at runtime. And all I have is the OCX, no TLB files to #import.

I hope this makes sense now.

Any help is much appreciated.

Thanks,
Arif.


Quote:
> Give more information.
> Is the ActiveX control implemented by the ATL DLL you're talking about ?
> Are DLL methods DllGetClassobject, DllRegisterServer and so on ?

> Frederic Claux



> > Hi All,

> > I want to use an ActiveX control inside an ATL DLL.  The DLL's methods
> will
> > in turn call the OCX control
> > methods to do some work.

> > How can I do this?

> > Thanks in advance,
> > Arif.



Fri, 09 May 2003 03:00:00 GMT  
 activex control inside atl dll - repost
In fact you don't need a .tlb to do an #import.

#Import should work just as well if you use the .ocx or .dll file. I do that
an it works like a champ.

I'm trying the same thing but don't know how to create the ActiveX without
having a parent window.

CAxWindow likes to have a parent window !

Any ideas ?

regards

Norman



Fri, 09 May 2003 03:00:00 GMT  
 activex control inside atl dll - repost
Well, I you don't know how to program the OCX file, it's a real problem is
it not ?!
You _always_ need a type library to #import components and interfaces.
Sometimes, the type library is bundled as a resource directly in the OCX or
DLL file and #import does take this into consideration.
To check if your OCX has a built-in typelib, launch Visual C++ then open the
file "as a resource" (OpenAs : resources). You should see a resource of type
"TYPELIB".

Frederic Claux



Quote:
> Hi Again,

> Thanks Alexander for your response. Here'e the detailed scenario:

> Frederic:
> I have an old ocx file (don't know who wrote it and which tool
> it was written in).  The purpose of the ocx is to do some business
> processing i,e read/write data to SQL server based on some
> business rules embedded in the ocx.

> I need to use this ocx in another simple dll (not another control).
> Actually the idea is to interface the ocx with another com component.
> The component basically sends out a simple method call + parameters.
> The way the ocx works is that you need to set its properties and
> then call its methods in a predefined sequence.  I need to establish
> this bridge. i,e translate the calls coming from another com component
> to this ocx.

> Let me try to clearify this.

> 1.  Component A sends out a message
> 2.  My component (lets call this Component B) will receive this
> message, invoke the OCX and call the ocx methods based on the
> message received by Component A.

> So I need to wrap the OCX in my AT L DLL.  The ocx is invisible
> at runtime. And all I have is the OCX, no TLB files to #import.

> I hope this makes sense now.

> Any help is much appreciated.

> Thanks,
> Arif.



> > Give more information.
> > Is the ActiveX control implemented by the ATL DLL you're talking about ?
> > Are DLL methods DllGetClassobject, DllRegisterServer and so on ?

> > Frederic Claux



> > > Hi All,

> > > I want to use an ActiveX control inside an ATL DLL.  The DLL's methods
> > will
> > > in turn call the OCX control
> > > methods to do some work.

> > > How can I do this?

> > > Thanks in advance,
> > > Arif.



Sat, 10 May 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Problem using activex control inside ATL com dll

2. ActiveX Control inside ATL DLL

3. ActiveX Control inside ATL.DLL Part II

4. Help - Problems with Drawing an MFC ActiveX control inside on ATL compsoite control

5. Problems with Drawing an MFC ActiveX control inside on ATL compsoite control

6. ActiveX control inside another activex control

7. ActiveX control inside another ActiveX control

8. ActiveX-control inside ActiveX-control

9. Placing a hook dll inside a activex control

10. Placing a hook dll inside a activex control

11. HELP: Using DLLs Inside ActiveX Controls

12. Placing a hook dll inside a activex control

 

 
Powered by phpBB® Forum Software