Click here to Skip to main content
15,890,282 members
Home / Discussions / COM
   

COM

 
GeneralRe: IIDFromString Failing ! [modified] Pin
Hans Ruck12-Jul-06 20:53
Hans Ruck12-Jul-06 20:53 
Questiondeveloping COM Application Pin
peter rankel11-Jul-06 21:03
peter rankel11-Jul-06 21:03 
AnswerRe: developing COM Application Pin
kumarprabhakar7411-Jul-06 22:22
kumarprabhakar7411-Jul-06 22:22 
Questioncallllllllllllllllllllllll Pin
arun.m11-Jul-06 21:03
arun.m11-Jul-06 21:03 
AnswerRe: callllllllllllllllllllllll Pin
Malli_S11-Jul-06 21:43
Malli_S11-Jul-06 21:43 
QuestionC# HELP Web service can not get array of int, or byte from COM object Pin
guocang11-Jul-06 11:33
guocang11-Jul-06 11:33 
AnswerRe: C# HELP Web service can not get array of int, or byte from COM object Pin
Mike Dimmick14-Jul-06 4:28
Mike Dimmick14-Jul-06 4:28 
QuestionBig Problem Pin
Ahmed Charfeddine11-Jul-06 1:21
Ahmed Charfeddine11-Jul-06 1:21 
I have many resembling activex controls (third party components with their SDKs) ( resemblance in functionnality). they are controls that controls different types of IP Surveillance Camera. I need to develop an application that is independent of them, ie access them independently, so that when i add new control for a new camera, the application needs not be recompiled. so the code has to be external to the application, more than that the linking should be explicit and at execution time rather at load time.
I tried using a DLL which contains a Cwnd object that embeds the activex control in order to declare the EventSink map there and be able to capture events and then relay them to the application by telling the Dll to link to its caller module.
but i did'nt even succeed to make calls in the direct sense, ie application-->exp Dll functions-->Cwnd member functions-->activex specific members, so to create the object etc, the problem being MFC-class pointer can't pass between app and Dll !!?
So how to encapsulate the different activex components in an abstract one. i tried to see COM, but unsuccessfully: is there a sort of activex control inheritance at least (derivation)? Or can I apply containment ( by creation of new activeX control or a general COM component which would contains an object of the particular ActiveX)


here's some other details (Note for the ActiveX control I can access them via C++, by building an MFC proxy class ( Create New class-->MFC class from ActiveX ) then integrate that class into a container where i insert the EventSink Map. Well i succeeded 100% in integrating evry control, and capturing its events, etc, but it's just about encapsulation)

the details :

"
the activex control i'm talking about are as i understood a sort of COM objects, which are to me classes that can be instantiated at execution time, so the dll needs not an implicit link to the client exe.
i have an application that access different camera on the network through those particular activex control, the code being like this :

for example for an axis camera, in the main view window i call
m_Axis.Create(...,this,CRect(..),..); ( m_Axis being here an object of an MFC proxy class to an activeX control (Axis Camera Media Control)).
and of course i handle the onsize member function :

so you can see that the activex control is even responsible for rendering the video stream. other members do the connection, allow me to get a handle to the image being displayed, etc.

so my problem is that i do'nt want the code to be integrated into my application, in order for the application not to depend on those control. so i want some sort of specification such the application can load and talk independently to those objects.


the code would look like :
CcameraControl *_cam[5];

and when the user adds a camera to be controled by the application, a dialog prompting for its ip address, and very possibly its type, appears, then i use the type information to localize the control which is then loaded into a case of the table above.

so i need to encapsulate, create new controls for evry activex, such that those control have the same functions and can talk to the caller-application using a same mechanism.

here's what i tried :

i thought i must derive new classes from the activex control, such those classes have the same functions. they need to relay the control from the application to their parent specific services. and capture events back from their parent and relay them to the application, but here i came to the inevitable ad the impossible :
although succeeding in encapsulating the controls into uniform components, there is no WAY for those classes to be loaded at the execution time and behave as true plug-in components. for example for MFC, if there is a wa&y to write a dll that exports some classes dervived from mfc classes, that dll need be implicitly linked to the exe, and this latter wouldn't succeed even to load without her.


Is in COM, ATL a solution ?

So what i did was to create a simple dll, that can access mfc, then in the CWinApp object i declared a Cwnd object ( acontainer for the specific control) and to there i shifted an activex control data member: when the window is created, it creates the control in its area. i declared the eventsink map in the CWnd so to capture the events. and then you have simple plain exportable functions that enable the caller to create the internal CWnd object and calles its members. but since i need to pass a parent window (originating from the application interface classes) then the problem i talked about comes ( mfc pointer)


here's also what i tried :
a new MFC ActiveX project, thinking i can apply the containment principle :
an abstract, wrapper Control contains the specific one, relay the evnts in either senses, but it just didn't work, the specific activex control create function fails when the OnCreate container member function is called to load the global control"

Thank u in advance.
charfeddine_ahmed@yahoo.fr
Questionhow to change recipents in outlook2003(vc6) Pin
cpusoft10-Jul-06 21:06
cpusoft10-Jul-06 21:06 
QuestionBSTR and VARIANT Pin
anu_8810-Jul-06 20:59
anu_8810-Jul-06 20:59 
AnswerRe: BSTR and VARIANT Pin
Rory Solley10-Jul-06 22:24
Rory Solley10-Jul-06 22:24 
QuestionCOM is based on what TYPE of DESIGN PATTERN Pin
Balkrishna Talele10-Jul-06 1:38
Balkrishna Talele10-Jul-06 1:38 
AnswerRe: COM is based on what TYPE of DESIGN PATTERN [modified] Pin
Machhindra10-Jul-06 23:04
Machhindra10-Jul-06 23:04 
Questioncan i pass object through IPC in .net ? code inn Pin
K edar V9-Jul-06 21:02
K edar V9-Jul-06 21:02 
AnswerRe: can i pass object through IPC in .net ? code inn Pin
Eran Aharonovich11-Jul-06 11:02
Eran Aharonovich11-Jul-06 11:02 
QuestionDCOM in service Pin
Greg_moon9-Jul-06 7:31
Greg_moon9-Jul-06 7:31 
QuestionHow do I invoke MySQL from a Com object Pin
Ger Hayden8-Jul-06 4:42
Ger Hayden8-Jul-06 4:42 
AnswerRe: How do I invoke MySQL from a Com object Pin
Malli_S10-Jul-06 1:26
Malli_S10-Jul-06 1:26 
QuestionHow do I call a dll from a com object Pin
Ger Hayden8-Jul-06 4:37
Ger Hayden8-Jul-06 4:37 
AnswerRe: How do I call a dll from a com object Pin
peterchen8-Jul-06 5:28
peterchen8-Jul-06 5:28 
QuestionFile Not found calling C# COM assembly from C++ [modified] Pin
JakeWyman8-Jul-06 1:30
JakeWyman8-Jul-06 1:30 
QuestionCom interface call retuns error "Not enough storage is available to complete this operation" Pin
george_thomas6-Jul-06 20:32
george_thomas6-Jul-06 20:32 
QuestionInstances of COM Objects Pin
HakunaMatada6-Jul-06 20:09
HakunaMatada6-Jul-06 20:09 
AnswerRe: Instances of COM Objects Pin
Lim Bio Liong6-Jul-06 22:30
Lim Bio Liong6-Jul-06 22:30 
GeneralRe: Instances of COM Objects Pin
george_thomas9-Jul-06 20:00
george_thomas9-Jul-06 20:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.