NPPropertyDialog function

Called when the user clicks a button added by using the NPPropertyDialog function. The NPPropertyDialog function is called only for file and directory network properties.


DWORD NPPropertyDialog(
  _In_ HWND   hwndParent,
  _In_ DWORD  iButtonDlg,
  _In_ DWORD  nPropSel,
  _In_ LPTSTR lpFileName,
  _In_ DWORD  nType


hwndParent [in]

A handle to the parent window that should own the file property dialog box.

iButtonDlg [in]

The index of the button that was pressed.

This index specifies which property dialog box was requested, starting with one for the first button returned from the NPGetPropertyText function. If there are multiple file names selected, 10 is added to this number. In other words, if there is more than one file selected and the user presses the first provider-defined property button, iButtonDlg will be 11. If there is only one file selected and the user presses the second network property button, iButtonDlg will be two.

nPropSel [in]

Specifies what items the property dialog box should act on. This parameter can be one of the following values.


A single file.


A single directory.


A selection of multiple files, directories, or both.


lpFileName [in]

A pointer to the names of the items that the property dialog box should act on. The only supported items are files and directories, so the item names are file names. These should be unambiguous, contain no wildcard characters, and be fully qualified, for example, C:\Local\Example.doc. Multiple file names should be separated with spaces. A file name that contains spaces can be enclosed in quotation marks, for example, "C:\My File". In this case, it is treated as a single name. A caret (^) can also be used as the quotation mechanism for single characters, for example, C:\My^"File and "C:\My^"File" both refer to the file C:\My"File.

nType [in]

Specifies the item type, which must be WNTYPE_FILE.

Return value

If the function succeeds, it returns WN_SUCCESS. If the function fails, it returns an error code. Call SetLastError to set this extended error code, which may include the following return codes.

Return codeDescription

One or more parameters is an unexpected form or value.


There is insufficient memory to display the dialog box.


A network error occurred.



This function is called only on sets of properties for which NPGetPropertyText has assigned a button name.

This function is used in File Manager to view and modify the network properties (for example, permissions) for files on a network device. If this function is not supported, File Manager does not provide any default behavior.

In this version of the Network Provider interface, lpFileName can point to only file names. The network provider should return WN_BAD_VALUE if it sees an inappropriate device.


Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]



See also