473,386 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

C3923

KH
Hi,

I'm porting a MAPI wrapper from the 1.x syntax to the 2.0 .net syntax and am
left with one error:

C3923: 'MyType::{ctor}::_SPropTagArray_myName' : local class, struct or
union definitions are not allowed in a member function of a managed class

The (abbreviated) code that generates this is:

MyType::MyType() // ctor
{
SizedSPropTagArray (3, myName) ;
}

With that code, the macro SizedSPropTagArray defines a new struct named
"_SPropTagArray_myName" with a 3-member array, which the new compiler rejects
because it's in a function.

I haven't tried it yet, but I'm assuming that moving the member up to class
level will solve the problem, but thought I'd see if anyone has come up with
a better solution?

Thanks,

Ken

Mar 10 '06 #1
1 1602
> I haven't tried it yet, but I'm assuming that moving the member up to
class
level will solve the problem, but thought I'd see if anyone has come up
with
a better solution?


I haven't had this problem before, but MSDN is very clear and short about
C3923.
You have to move the declaration out of the method, and that should solve
your problem.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"
Mar 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.