|
Follow the thread of DECLARE_CLASSFACTORY_SINGLETON through the documentation.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
|
I'm looking for a good how-to book and a good reference (in-depth) book for ATL in VS.NET. (ATL 7?)
Thanks.
-Sean
----
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -- Albert Einstein.
I saw a woman wearing a sweatshirt with 'Guess' on it. I said, "Thyroid problem?" -- Emo Philips.
Love is two minutes, 52 seconds of squishing noises. -- Johnny Rotten.
|
|
|
|
|
Reasonable Developer
i wanted to download the SDK of Microsoft Project, i try my best but fail(it give overview of MS Project 2002) pls help me. So nice of u
Note
i have already test it but it was just an overview of sdk whereas i have to integrate the MS Project & therefore i need to download the complete sdk, now pls try for it & if u find any solution inform me
So nice of u OK
|
|
|
|
|
Please do not cross post.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I'm just about to start a new ATL COM Service using VS.NET. I'm wondering if there are any advantages to using an attributed ATL Service or whether it is more hassle than it is worth?
Anybody used it and care to share their insights.
Michael
Life’s not a song.
Life isn’t bliss.
Life is just this.
It’s living. -- Buffy the Vampire Slayer: Once more, with feeling
|
|
|
|
|
Use attributes whenever you want to lock your code and get nobody to be able to recompile it !
Seriously, i believe there are good and bad things about it :
- good, separate IDL files are in fact not needed. Using attributes is a complement of ATL macros, and can produce COM services with fast and effective code. In an ideal world, ATL macros would have even been made obsolete thanks to the attributes, but it looks like VS.NET 1.0 is a product in the middle of something.
- good, attributes open new business opportunities for software companies. We have yet to see such products, though. Think about intellisense support for instance.
- bad, no debugging support.
- bad, attribute style is proprietary. Attributes may change between 2 VS.NET releases (forces you to upgrade your code).
|
|
|
|
|
Thanks,
.S.Rod. wrote:
- bad, no debugging support.
Well that pretty much sealed it for me. I'll steer clear of attributes for the moment.
Michael
Life’s not a song.
Life isn’t bliss.
Life is just this.
It’s living. -- Buffy the Vampire Slayer: Once more, with feeling
|
|
|
|
|
I'm no expert, but I've been playing around with attributes and there is debugging support. The attribute injected code is referenced in the pdb (debug) file when you do the build.
In addition with a compiler switch /Fx it will show you all the code that it is injecting by placing it in a separate file in your project folder.
In fact you can copy the code out of the separate files it generates and put them back into your project in place of the attributes if you want more control over things.
There is an overview article about attributes that might help you make your decision:
http://msdn.microsoft.com/msdnmag/issues/01/04/attributes/default.aspx[^]
|
|
|
|
|
Example one:
I create custom (dialog based) toolbar. CMainFrame winproc eats up RBN_AUTOSIZE, so my view has resizing problems. Temp Fix NOTIFY_CODE_HANDLER(RBN_AUTOSIZE, ...) at the beginning of the message map.
Example two:
on a property page (CPropertyPageImpl) I try to create owner drown combo. CPropertyPageImpl winproc eats up WM_DRAWITEM for the edit part. Fix is similar to intercept WM_DRAWITEM and ::SendMessage(((LPDRAWITEMSTRUCT)lParam)->hwndItem ....
There is obviously something that I am doing wrong in my code that makes WTL/ATL winprocs to eat up the messages. Any ideas?
|
|
|
|
|
Perhaps adding the REFLECT_NOTIFICATIONS() macro to the message map would be helpful.
|
|
|
|
|
done that - does not help
|
|
|
|
|
[
object,
uuid(F7E68672-A712-4BCC-B913-A99CA2396674),
helpstring("IComminucation Interface"),
pointer_default(unique)
]
interface IComminucation : IUnknown
{
[helpstring("Allocate a connect to Mid-ware")] HRESULT AllocaConnect([out, retval] void * p_pclMid); // error line, error message see blow.
};
....
error MIDL2139 : type of the parameter cannot derive from void or void * : [ Parameter 'p_pclMid' of Procedure 'AllocaConnect' ( Interface 'IComminucation' ) ]
|
|
|
|
|
COM does not support void - obvious marshaling problems.
|
|
|
|
|
Why dose QueryInterface suport void*?
|
|
|
|
|
The parameter is void** because you pass in a pointer to an interface (which is itself a pointer). Since QI is designed to return any supported interface, this being typed would be a problem, so void** is the obvious(?) choice for the type.
Anyone else have a devstudio macro that wraps reinterpret_cast<void**>() around the selected word?
Steve S
[This signature space available for rent]
|
|
|
|
|
1. Because it is base COM API function.
2. First argument provides enough information for marshaling.
3. MS is exception to its own rules
|
|
|
|
|
IMiracle wrote:
HRESULT AllocaConnect([out, retval] void * p_pclMid);
should be
HRESULT AllocaConnect([out, retval] void ** p_pclMid);
--
If I had the ability to smooth talk like John Simmons, this post would be less sarcastic and more to the point.
|
|
|
|
|
Hi all.
I am looking for a treeview/listview hybrid. There are many implementations using MFC, but for WTL I've only found the CTreeListView by Bjarke Viksøe[^], which is quite buggy. I am convinced that there are more implementations out there... TIA.
Regards
Thomas
Sonork id: 100.10453 Thömmi
Disclaimer: Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.
|
|
|
|
|
Take the best MFC one you can find and port it to WTL.
All us WTLies will be thankful.
/Magnus
- I don't necessarily agree with everything I say
|
|
|
|
|
Hello,
I was wondering if anyone knows how to pass paramaters that aren't supported by Automation?
For example if I am trying to pass the types "LONGLONG" and a "GUID" in a COM object that supports
automation, but automation doesn't support these types. Is there a solution that I can follow to implement these?
I am using visual c++ 6.0 within a windows 2000 environment.
Thanks for any ideas or help.
|
|
|
|
|
Your COM object supported automation can not support the "LONGLONG" and "GUID" types because they are not OLE-compatible types. It's impossible.
Though you are able to pass these values as a "struct" (or UDT) type which is OLE-compatible.
With best wishes,
Vita
|
|
|
|
|
Thanks for the advice! I was pretty sure that Automation couldn't pass those types but it is always good to hear it from someone else.
I convert my GUID to a bstr before I pass it through now, and will have to try the UDT approach with the LONGLONG.
Thanks again for the reply!
|
|
|
|
|
If I increment a version of a COM control, would it follow that I must change the uuid as well?
In other words would I change my interface definition from this:
vi_progid("GZTW.Tips.TipOfTheDay"),<br />
progid("GZTW.Tips.TipOfTheDay.1"),<br />
version(1.0),<br />
uuid("E89258B1-A73E-4141-9E0F-64F5D056B1AC"),
to this:
vi_progid("GZTW.Tips.TipOfTheDay"),<br />
progid("GZTW.Tips.TipOfTheDay.2"),<br />
version(2.0),<br />
uuid("NEW UUID HERE"),
And then publish for users the new version dependant program ID as well as the new UUID?
(I know there are many other issues regarding this from the end users point of view, It's just that I noticed if I don't change the UUID, the registry contains keys for both versions with the same UUID)
|
|
|
|