网站首页  词典首页

请输入您要查询的函数:

 

术语 shpathprepareforwrite
释义 SHPathPrepareForWrite
语法:
HRESULT SHPathPrepareForWrite( HWND hwnd,
IUnknown *punkEnableModless,
LPCTSTR pszPath,
DWORD dwFlags
);
SHPathPrepareForWrite功能
检查是否存在的路径。这包括重新挂载映射的网络驱动器,弹出式媒体提示要重新插入,形成了路径,媒体提示要格式化,并提供相应的用户界面,如有必要。读/写权限的媒介不检查。
参数
hwnd
[in]一个窗口句柄指定的父窗口将用于任何用户界面,必须创建的窗口。如果设置为NULL,用户界面窗口不会创建。
punkEnableModless
[in]一个指向IUnknown接口,它指定IOleInPlaceActiveObject对象实现EnableModeless方法。
pszPath
[in]指向一个NULL结尾的最大长度MAX_PATH指定的路径作为有效的书面确认字符串。这可以是一个通用命名约定(UNC)路径或文件的驱动器。
dwFlags
[in]的标志确定的行为选择。此参数可以是下列值的组合。
SHPPFW_NONE
不要创建新的目录。
SHPPFW_DEFAULT
默认。不提示用户是否需要一个目录创建。这是相同的SHPPFW_DIRCREATE。没有通过的SHPPFW_ASKDIRCREATE。
SHPPFW_DIRCREATE
创建不提示用户目录。没有通过的SHPPFW_ASKDIRCREATE。
SHPPFW_ASKDIRCREATE
创建目录之前提示用户。没有通过的SHPPFW_DIRCREATE。
SHPPFW_IGNOREFILENAME
在pszPath最后一项是一个文件名,因此忽略。例如,如果pszPath =的“C:\\ Mydir的\\ MyFile.doc”,只有使用的“C:\\ Mydir的”。如果pszPath =的“C:\\ MyFirDir \\ MySecDir”,只有使用的“C:\\ MyFirDir”。
SHPPFW_NOWRITECHECK
目前未实施。
SHPPFW_MEDIACHECKONLY
Windows XP或更高。抑制“无法访问”错误消息框,其中显示故障时比其他用户注销时,并hwnd是不是NULL。
返回值
返回S_OK如果路径可用,或错误代码,否则。请注意,S_OK,将返回值并不意味着媒介是可写的,它只是意味着路径可用。
备注
这一职能的主要用途是一个程序后,才能够使用它的路径和表现出必要的用户界面,以提示用户。例如,如果在磁盘驱动器A:人失踪,一个窗口,提示用户插入磁盘将出现。
功能信息
最低DLL版本 shell32.dll 5.0或更新版本
自定义ImplementationNo
Headershlobj.h
import libraryshell32.lib
2000年最低经营systemsWindows
UnicodeImplemented为ANSI和Unicode版本。
==英文原文==SHPathPrepareForWrite Function
Checks to see if the path exists. This includes remounting mapped network drives, prompting for ejectable media to be reinserted, creating the paths, prompting for the media to be formatted, and providing the appropriate user interfaces, if necessary. Read/write permissions for the medium are not checked.
Syntax
HRESULT SHPathPrepareForWrite( HWND hwnd,
IUnknown *punkEnableModless,
LPCTSTR pszPath,
DWORD dwFlags
);
Parameters
hwnd
[in] A handle to a window that specifies the parent window to be used for any user interface windows that must be created. If set to NULL, user interface windows are not created.
punkEnableModless
[in] A pointer to an IUnknown interface that specifies the IOleInPlaceActiveObject object that implements the EnableModeless method.
pszPath
[in] A pointer to a null-terminated string of maximum length MAX_PATH that specifies the path to be verified as valid for writing. This can be a Universal Naming Convention (UNC) or file drive path.
dwFlags
[in] Flags that determine behavior options. This parameter can be a combination of the following values.
SHPPFW_NONE
Do not create new directories.
SHPPFW_DEFAULT
Default. Do not prompt the user if a directory needs to be created. This is identical to SHPPFW_DIRCREATE. Do not pass with SHPPFW_ASKDIRCREATE.
SHPPFW_DIRCREATE
Create directories without prompting the user. Do not pass with SHPPFW_ASKDIRCREATE.
SHPPFW_ASKDIRCREATE
Prompt the user before creating directories. Do not pass with SHPPFW_DIRCREATE.
SHPPFW_IGNOREFILENAME
Last item in pszPath is a file name, so ignore. For example, if pszPath="C:\\MyDir\\MyFile.doc", only use "C:\\MyDir". If pszPath="C:\\MyFirDir\\MySecDir", only use "C:\\MyFirDir".
SHPPFW_NOWRITECHECK
Not currently implemented.
SHPPFW_MEDIACHECKONLY
Windows XP or later. Suppresses the "not accessible" error message box, which displays when a failure other than a user cancellation occurs, and hwnd is not NULL.
Return Value
Returns S_OK if the path is available, or an error code otherwise. Note that a return value of S_OK does not mean that the medium is writable; it simply means that the path is available.
Remarks
The primary use of this function is for a program to check a path before using it and display the necessary user interface to prompt the user. For example, if the disk in drive A: were missing, a window that prompts the user to insert the disk would appear.
Function Information
Minimum DLL Versionshell32.dll version 5.0 or later
Custom ImplementationNo
Headershlobj.h
Import libraryshell32.lib
Minimum operating systemsWindows 2000
UnicodeImplemented as ANSI and Unicode versions.
==原始网址==http://msdn.microsoft.com/en-us/library/bb762237(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:28:31