I'm looking for a pointer in the right direction, if someone can help.
I need to create an ActiveX control which displays in a frame window and which can be hosted by IE. In other words, rather than a control which sits on the web page's background, I need the control to pop up in its own frame window. As various events happen on the web page, custom methods / properties on the control will be invoked. All the ATL samples and other examples I can find which have a UI / GDI aspect to them just sit on the web page's background. So I'm not sure the best way to go about this.
It would seem that, after creating an ATL project and adding an ATL ActiveX control, there are two options: 1) modify the generated code in the control to somehow make it a window with a frame that floats outside the browser's window. I'm not sure if that's feasible given that IE controls the window's creation and its initial style settings. 2) Make the control that IE knows about UI-free but have it create a frame window / control and perhaps delegate custom interface methods on the "main" control to this control. That seems feasible, but it always helps to see something nominally similar as a starting point.
If anyone could point me to an example or some docs that cover this type of control, I'd appreciate it.
Sombody gave me a book about DCOM and its for VC6.I install VC7 now on my computer.Does ATL7 changes a lot and Does it have lots of difference if I use that book in VC7?
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
You must create proxy/stub DLL for custom data marshaling.
Go to your Obj path and find YourObj.mk, build this make file (you can "Insert Project into Workspace" rename *.mk to *.mak and add this mkae file to Workspace)
and after you register your com obj register produced proxy/stub DLL.
P.S. on build machine you must register proxy/stub file every time you rebuild your COM object project.
If you want to use an interface from a worker thread you must marshal that interface. This makes sure that if the worker thread and the object exists in two different appartments, then the method will be invoked in the proper appartment.
Take a look at the global interface table for an easy way to marshal interfaces.
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
I am new to COM etc and I don't have no knowledge of Marshaling etc.
I have noticed some code "CoCreateFreeThreadedMarshaler(..) etc" created by MFC. Is that what you are talking about ? Please confirm. Or any other pointers or samples would be helpful.
A confusion has prevailed for quite some time for me now that what exactly is the COM status in .NET like how can we create COM components in .NET and what r the similarities and dissimilarities in COM components coded b4 and now in .NET?
I disagree that there is any confusion except by naysayers wanting to dropkick MS and/or .NET
COM is very much alive and well in .NET. In fact, my Inside C# book has over a 100 pages dedicated to the subject of COM interop!
Here's what Don Box had to say aobut the future of COM development regarding .NET
“Virtually all aspects of the COM programming model have survived (interfaces, classes, attributes, context, and so on). Some may consider COM dead simply because common language runtime objects don't rely on IUnknown-compliant vptrs/vtbls. I look at the runtime as breathing new life into the programming model that I've spent the last seven years of my life working with, and I know there are other programmers out there who share this sentiment" - Don Box
i am not trying to paly down the .NET here, the only reason i have posted this question was that we here in pakistan dont have the access to the newer books on .NET , and the one i got had potryed this concept which i mentioned in my question
i am working in .NET so i had to confirm what i had read and also get some views on it from other ppl
zakimurtaza wrote: i am not trying to paly down the .NET here,
You misunderstood, mate. I was referring to the information you were getting from other sources. I've, myself, read many articles saying things like COM is dead under .NET and was really just letting you know that this rumours are greatly exaggerated.
zakimurtaza wrote: I am working in .NET so i had to confirm what i had read and also get some views on it from other ppl
That is the way to learn and certainly the approach I take.
I'm a newbie and have just read one whole entire book on COM and part of another. I understand most but not all of it. I might have missed this but if I want to develop a COM object or ActiveX control for use by Visual Basic, do I have to use variant data types (in my Visual C++ server code) or will it get automatically converted from the type library? I guess I'm talking about for automation purposes/late binding. Though, I'm not sure.
Ok. Thanks. Yes, now I recall the other automation data types. I think I got confused with example in book saying something about using Variants was better for automation late binding...maybe it was referring to the script languages.
I have a VB6 COM component that exposes a collection class I wrote using Function NewEnum() as IUnknown to enable for each iteration of the collection. The procedure attributes are set correctly to -4, hidden.
When I try to iterate the collection via interop using the vb.net code below, I get "QI for IEnumVARIANT failed on the unmanaged server," but only when executing it in the code behind an asp.net page. works fine behind a .net windows form. same problem if I attempt it in C#.
Dim rdfs As ReportMgr.ReportDefs
Dim rdf As ReportMgr.ReportDef
rdfs = New ReportMgr.ReportDefs()
For Each rdf In rdfs