Mattias,
Thanks, this looks great. I should have thought of the everything_else
pointer. It certainly saves a lot of work :)
Erick
----- Original Message -----
From: "Mattias Sj�gren" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 14, 2002 2:15 PM
Subject: Re: [DOTNET] RCW for IFilter and LoadIFilter
Erick,
>Now, the PROPVARIANT is a huge mess of an object, and it appears under the
>general COM section of the SDK. I assume that it's related to the VB
variant
>datatype. Is there a .net version/wrapper for this struct already defined
>somewhere?
Try this
[StructLayout(LayoutKind.Explicit)]
struct PROPVARIANT
{
[FieldOffset(0)] public short vt;
[FieldOffset(2)] public short wReserved1;
[FieldOffset(4)] public short wReserved2;
[FieldOffset(6)] public short wReserved3;
[FieldOffset(8)] public sbyte cVal;
[FieldOffset(8)] public byte bVal;
[FieldOffset(8)] public short iVal;
[FieldOffset(8)] public ushort uiVal;
[FieldOffset(8)] public int lVal;
[FieldOffset(8)] public uint ulVal;
[FieldOffset(8)] public long hVal;
[FieldOffset(8)] public ulong uhVal;
[FieldOffset(8)] public float fltVal;
[FieldOffset(8)] public double dblVal;
[MarshalAs(UnamangedType.Currency)]
[FieldOffset(8)] public decimal cyVal;
[FieldOffset(8)] public DateTime cyVal;
[MarshalAs(UnamangedType.VariantBool)]
[FieldOffset(8)] public bool boolVal;
[MarshalAs(UnamangedType.Error)]
[FieldOffset(8)] public int scode;
[FieldOffset(8)] public FILETIME filetime;
[FieldOffset(8)] public IntPtr everything_else;
}
Mattias
===
Mattias Sj�gren
[EMAIL PROTECTED]
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.