You may also want to type the dwMask, dwModeFlags, and crBkgnd members of your struct 
as uint, as the native Win32 struct has them
as DWORD and COLORREF, which are unsigned types.

Here's a handy little table:
ms-help://MS.VSCC/MS.MSDNVS/win32/type_4ylv.htm

Keep Smilin'
Ed Stegman


-----Original Message-----
From: Dumitru Sbenghe

Yeap; I didn't see the UnmanagedType.ByValTStr which is better than
UnmanagedType.ByValArray in case of strings;


-----Original Message-----
From: Andreas Häber
snip...

public struct DeskBandInfo
{
    public Int32 dwMask;
    public POINTL ptMinSize;
    public POINTL ptMaxSize;
    public POINTL ptIntegral;
    public POINTL ptActual;
    [MarshalAs(UnmanagedType.LPWStr, SizeConst=256)] public String wszTitle;
    public Int32 dwModeFlags;
    public Int32 crBkgnd;
}

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to