Shouldn't IconInfo be a value struct? Also, shouldn't you declare the following:



[DllImport("user32.dll")]
static bool GetIconInfo(IntPtr hIcon, IconInfo^ pIconInfo);

// as
...