Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2006

Tip: Looking for answers? Try searching our database.

C3923

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
KH - 10 Mar 2006 18:55 GMT
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
Bruno van Dooren - 10 Mar 2006 19:11 GMT
> 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.

Signature

Kind regards,
   Bruno.
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.