WICCreateBitmapFromSectionEx 函式 (wincodec.h)

會傳回 IWICBitmapSource ,其是由 Windows 圖形裝置介面的圖元所支援, (GDI) 區段控制碼。

語法

HRESULT WICCreateBitmapFromSectionEx(
  [in]  UINT                  width,
  [in]  UINT                  height,
        REFWICPixelFormatGUID pixelFormat,
  [in]  HANDLE                hSection,
  [in]  UINT                  stride,
  [in]  UINT                  offset,
  [in]  WICSectionAccessLevel desiredAccessLevel,
  [out] IWICBitmap            **ppIBitmap
);

參數

[in] width

類型: UINT

點陣圖圖元的寬度。

[in] height

類型: UINT

點陣圖圖元的高度。

pixelFormat

類型: REFWICPixelFormatGUID

點陣圖的像素格式。

[in] hSection

類型: HANDLE

區段控制碼。 這是 CreateFileMapping 函式所傳回的檔案對應物件控制碼。

[in] stride

類型: UINT

每個掃描線的位元組計數。

[in] offset

類型: UINT

區段中的位移。

[in] desiredAccessLevel

類型: WICSectionAccessLevel

所需的存取層級。

[out] ppIBitmap

類型: IWICBitmap**

接收點陣圖的指標。

傳回值

類型: HRESULT

如果此函式成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

規格需求

   
最低支援的用戶端 適用于 Windows Vista 的 Windows 7、Windows Vista SP2 和平臺更新 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 wincodec.h
程式庫 Windowscodecs.lib
Dll Windowscodecs.dll