共用方式為


GetDisplayAutoRotationPreferencesByProcessId 函式 (winuser.h)

擷取 dwProcessId 參數所指示進程的螢幕自動旋轉喜好設定。

語法

BOOL GetDisplayAutoRotationPreferencesByProcessId(
  [in]  DWORD                  dwProcessId,
  [out] ORIENTATION_PREFERENCE *pOrientation,
  [out] BOOL                   *fRotateScreen
);

參數

[in] dwProcessId

要取得喜好設定的程式。

[out] pOrientation

記憶體中位置的指標,該位置將接收所指示進程的目前方向喜好設定。

[out] fRotateScreen

記憶體中位置的指標,會接收 TRUE 或 FALSE 值,指出是否旋轉螢幕以符合進程方向喜好設定。

傳回值

如果方法成功,則為 TRUE,否則為 FALSE。

應用程式應該使用 GetDisplayAutoRotationPreferences 來擷取其自動輪替喜好設定,而不是使用此 API。 如需範例,請參閱 GetDisplayAutoRotationPreferences

規格需求

   
目標平台 Windows
標頭 winuser.h
Dll Kernel.dll