public extern static int SHGetImageList(ImageListSize iImageList, ref Guid riid, out IImageList2 ppv);
public ImageList(ImageListSize size) { this._Size = size; this._SizePixels = new Lazy <Int32Size>(this.GetSizePixels); var hresult = Win32Api.SHGetImageList(size, ref IID_ImageList2, out this._ImageList); Marshal.ThrowExceptionForHR(hresult); }