By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,587 Members | 1,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,587 IT Pros & Developers. It's quick & easy.

Exchange class objects within IDL?

P: n/a
Hello NG,

is it possible to move a class object through an idl interface? I have
created a new ATL DLL project within the Visual Studio 6. I have added
two ATL objects (names are ClassA and ClassB) with one interface per
classe. Now I want to give a property of ClassB an object of ClassA.
Is this possible? And what must I do:

// The code with the error:
interface ClassB : IDispatch
{
[propget, id(1), helpstring("property A")] HRESULT Head([out, retval]
ClassA *pVal);
[propput, id(1), helpstring("property A")] HRESULT Head([in] ClassA
newVal);
};

The error is:
T:\New\TestPrj.idl(18) : error MIDL2025 : syntax error : expecting a
type specification near "ClassA"

So the compiler dont know ClassA.

Regards

Martin

Aug 7 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Aug 7, 11:12 am, Martin.S...@gmx.net wrote:
Hello NG,

is it possible to move a class object through an idl interface?
[remainder redacted]

I'm afraid you have come to the wrong group. This group discusses
Standard C++ per ISO/IEC 14882:2003. You might want to consider a
newsgroup dedicated to the Windows platform.

See FAQ 5.9 for a list of suggested groups. The FAQ is at
http://www.parashift.com/c++-faq-lite

Aug 7 '07 #2

P: n/a
Ma*********@gmx.net writes:
>
The error is:
T:\New\TestPrj.idl(18) : error MIDL2025 : syntax error : expecting a
type specification near "ClassA"
Best guess: Try to include ClassA's header file.

As this is a C++ newsgroup and your question has nothing or next to
nothing to do with C++ you probably won't get an answer here.

Try microsoft.vc or something like that...

R.

Aug 7 '07 #3

P: n/a
Thanks. I have search for COM in Google and found an entry within this
NG. I will change to ms.vc.
Best guess: Try to include ClassA's header file.
I have tried this but got lots more error message. Keyword class
unkown... it seems that C++ Header cannot be inserted.

Aug 7 '07 #4

P: n/a
Ma*********@gmx.net wrote:
Thanks. I have search for COM in Google and found an entry within this
NG. I will change to ms.vc.
>Best guess: Try to include ClassA's header file.
I have tried this but got lots more error message. Keyword class
unkown... it seems that C++ Header cannot be inserted.
OK, I was polite before, now I won't be.

What part of "You're off-topic here, ask in a Microsoft specific
newsgroup" did you not understand?
Aug 8 '07 #5

P: n/a
Personal apology to Martin.

I missed the part where you said you were going to a more topical
group.

I went overboard and for that, I apologize.

red floyd

Aug 8 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.