Skip to content

Latest commit

 

History

History
126 lines (84 loc) · 4.2 KB

nf-shlobj_core-pifmgr_openproperties.md

File metadata and controls

126 lines (84 loc) · 4.2 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:shlobj_core.PifMgr_OpenProperties
PifMgr_OpenProperties function (shlobj_core.h)
Opens the .pif file associated with a Microsoft MS-DOS application, and returns a handle to the application's properties.
OPENPROPS_INHIBITPIF
OPENPROPS_NONE
PifMgr_OpenProperties
PifMgr_OpenProperties function [Windows Properties]
_win32_PifMgr_OpenProperties
properties.PifMgr_OpenProperties
shell.PifMgr_OpenProperties
shlobj_core/PifMgr_OpenProperties
properties\PifMgr_OpenProperties.htm
properties
0bc11528-7278-4765-b3cb-671ba82c9155
12/05/2018
OPENPROPS_INHIBITPIF, OPENPROPS_NONE, PifMgr_OpenProperties, PifMgr_OpenProperties function [Windows Properties], _win32_PifMgr_OpenProperties, properties.PifMgr_OpenProperties, shell.PifMgr_OpenProperties, shlobj_core/PifMgr_OpenProperties
shlobj_core.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Shell32.lib
Shell32.dll (version 5.0 or later)
Windows
19H1
PifMgr_OpenProperties
shlobj_core/PifMgr_OpenProperties
c++
APIRef
kbSyntax
DllExport
Shell32.dll
PifMgr_OpenProperties

PifMgr_OpenProperties function

-description

[PifMgr_OpenProperties is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Opens the .pif file associated with a Microsoft MS-DOS application, and returns a handle to the application's properties.

-parameters

-param pszApp [in]

Type: PCWSTR

A null-terminated Unicode string that contains the application's name.

-param pszPIF [in, optional]

Type: PCWSTR

A null-terminated Unicode string that contains the name of the .pif file.

-param hInf

Type: UINT

A handle to the application's .inf file. Set this value to zero if there is no .inf file. Set this value to -1 to prevent the .inf file from being processed.

-param flOpt

Type: UINT

A flag that controls how the function operates.

OPENPROPS_INHIBITPIF

Ignore any existing .pif files and get the properties from win.ini or _Default.pif. This flag is ignored on Windows NT, Windows 2000, and Windows XP.

OPENPROPS_NONE

No options specified.

-returns

Type: HANDLE

Returns a handle to the application's properties. Use this handle when you call the related .pif functions.

-remarks

You should not think of PifMgr_OpenProperties as a function that opens a file somewhere. The .pif file does not remain open after this call. It is more useful to think of the function as a property structure allocator that you can initialize using disk data. The primary reason why this function fails is because of low memory or inability to open the specified .pif file.

If no .pif file exists, the function still allocates a data block in memory and initializes it with data from _Default.pif or its internal defaults. If the function looks for a .pif file name but does not find it, it constructs a name and saves it in its internal .pif data structure. This guarantees that if PifMgr_SetProperties is called, the data is saved to disk.

If the function does not find the .pif file, it searches for it in the following order.

  1. Searches the current directory.
  2. Searches the specified directory.
  3. Searches in .pif directory.
  4. Searches the folders specified by the PATH environment variable.

-see-also

PifMgr_CloseProperties

PifMgr_GetProperties