Exchange class objects within IDL?

M

Martin.Salo

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
 
R

Renee Klawitter

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.
 
R

redfloyd

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
 
M

Martin.Salo

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.
 
R

red floyd

Thanks. I have search for COM in Google and found an entry within this
NG. I will change to ms.vc.

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?
 
R

redfloyd

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top