Re: C++/CLI and bitfield marshalling

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Brandon Bray [MSFT] (branbray_at_online.microsoft.com)
Date: 02/23/04


Date: Mon, 23 Feb 2004 14:06:09 -0800


. wrote:
> Whats this "!" syntax? I never seen it before.

It is how you write finalizers in the new syntax. It's similar to how
destructors are written with the ~ syntax.

> I have done the usual mixed mode wrapper with a library being a proxy for
> every method and have a few structs that I have to pass in and out so I
> mirrord those. But these bitfields got me stumped.
> So IF I understand that right I basically wrap this bitfield and set it
> via a ctor in the CLR type, unless I specify propsets for every member,
> right?

Exactly what you do depends on the abstraction. The example I showed simply
gave a way to wrap an existing type that has bit fields into a managed type
that C# can understand. The point is that there is no need to encode bit
types inside a ref or value class because you can simply wrap the native
type.

-- 
Brandon Bray, Visual C++ Compiler         http://blogs.msdn.com/branbray/
This posting is provided AS IS with no warranties, and confers no rights.


Relevant Pages

  • Re: DOS copying
    ... >'copy' and 'xcopy' commands dont like the syntax once the spaced folder names ... >are introduced - anyone know are workaround?? ... Wrap the path in quotes - eg ...
    (microsoft.public.windowsxp.general)
  • Re: Strange format of the result of caculated control..
    ... >Can you please help me with the syntax, can I apply the func the calculated ... >control I am working with right here. ... simply wrap your expression, whatever it is, in a call to the ...
    (microsoft.public.access.queries)
  • Re: (byte)0 - What exactly does this syntax mean?
    ... and there is one piece of syntax I ... can't wrap my head around. ... The other replies are basically correct, but...0 is implicitly convertable to byte. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Procmail Problem
    ... Davide Bianchi wrote: ... Note that the syntax of procmailrc is *really*: ... a little easier for the mentally-challenged to wrap their brains around, ...
    (comp.unix.admin)
  • Re: C question
    ... Those are called "bitfields". ... They mean that the first field occupies 8 ... syntax. ... Prev by Date: ...
    (comp.arch.embedded)