|
VARIANT and BSTR get used because they are compatible with 'automation'. What this means in practice is the interfaces can be called from languages like Visual Basic which only have automatic marshalling and can be called from C++ without writing any marshalling code. BSTR is essentially the same as VBs internal String class so it can make using the control from VB easy enough that even a VB programmer might manage it.
What type you use in your interface when creating ActiveX controls really depends on what clients you need to support.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Thanks for the reply. If my client is in C sharp that what types I am supossed to use?
Regards,
LG
lgatcodeproject
|
|
|
|
|
You need to use BSTR only. And Client can use datatype compatible to it. for C# String class can be used. Intellisense will tell you about datatype need to be used by client.
|
|
|
|
|
If I were you I'd ask a C# programmer, perhaps on the C# forum, I have NO idea, sorry.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Thanks for the concern.
Regards,
LG
lgatcodeproject
|
|
|
|
|
Can anybody tell me what are the diferent types of classes in C++
|
|
|
|
|
What are you talking about ?
|
|
|
|
|
I have been placed in front of this question in an interview.I dont knw the exact answer.I think that its like composite class , utility class..etc
|
|
|
|
|
Deepu Antony wrote: I think that its like composite class , utility class..etc
Don't think so.
Deepu Antony wrote: I have been placed in front of this question in an interview
What was the context ? Because out of context, this doesn't make any sense.
|
|
|
|
|
he just asked me...like tat..he started with that question..
|
|
|
|
|
That sends a clear message about the one who interviewed you. That question is way too dumb without having a context provided.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
A class is a class, period. It's up to the user of such classes to determine what they are and how they are used.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
What do you want to know?
|
|
|
|
|
different type of class :_) what else!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Can anybody tell me wat is a composite class in C++
|
|
|
|
|
Do you mean composite design pattern [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
no...spefically composite class and there is some relation beteween cpmposite and private inheritance.
|
|
|
|
|
Double personality?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
not like that..i asked him to post this question..he is my collegue.
|
|
|
|
|
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
If it was an interview then (I insist ) I strongly suspect he was actually referring to the composite design pattern.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I had the same exact thought. Signing up is FREE, you see.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Five millions and growing!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
are you talking about the concept of 'Composition' in C++?
Regards,
Vijay.
|
|
|
|
|
You can do a Google search and get the answer.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|