网站首页  词典首页

请输入您要查询的函数:

 

术语 shgetnewlinkinfo
释义 SHGetNewLinkInfo
语法:
BOOL SHGetNewLinkInfo( LPCTSTR pszLinkTo,
LPCTSTR pszDir,
LPTSTR pszName,
BOOL *pfMustCopy,
UINT uFlags
);
SHGetNewLinkInfo功能
上创建快捷方式的目标为根据,提出一个新的快捷方式的名称。此函数不创建快捷方式,只是名称。
参数
pszLinkTo
[in]一个指向的路径和文件的快捷方式的目标名称。如果uFlags并未包含SHGNLI_PIDL价值,这个参数是一个空地址结尾的字符串,其中包含的目标。如果uFlags包含SHGNLI_PIDL值,此参数是对一个项目标识符列表(的PIDL),代表目标的指针。
pszDir
[in]指向一个空结束的字符串,其中包含在其中的快捷方式将创建的文件夹路径。
pszName
[out] 一个字符串,它接收空终止路径和文件的快捷方式的名称的指针。此缓冲区被假定为至少MAX_PATH字符的大小。
pfMustCopy
[内]的一个BOOL值,接收一个标志,指示是否会被复制快捷方式解决。 When a shortcut to another shortcut is created, the Shell simply copies the target shortcut and modifies that copied shortcut appropriately.此参数接收一个非零值,如果目标在pszLinkTo指定指定一个快捷方式,将导致目标快捷方式被复制。此参数接收为零,如果目标没有指定要复制的快捷方式。
uFlags
[in]的功能的选项。这可以是零,或者是下列值的组合。
SHGNLI_PIDL
0x000000001。目标指向pszLinkTo是的PIDL代表的目标。如果这个标志不包括pszLinkTo被认为是一个字符串,它包含的路径和文件的目标名称地址。
SHGNLI_NOUNIQUE
0x000000002。跳过正常的检查,确保该快捷方式的名称是目标文件夹内的独特。如果这个标志不包括在内,则函数创建快捷方式的名称,然后确定是否该名称是在目标文件夹的唯一。如果具有相同名称的文件已经在目标文件夹存在,快捷方式的名称将被修改。这个过程是一个独特的名字,直到找到重复。
SHGNLI_PREFIXNAME
0x000000004。创建的名字之前,将字符串“捷径”。
SHGNLI_NOLNK
0x000000008。 5.0版本不要添加。lnk文件扩展名。您必须设置_WIN32_IE宏5.01或更高版本使用此标志。欲了解更多有关版本信息,请参阅壳牌和公共控件版本。
SHGNLI_NOLOCNAME
0x000000010。 Windows Vista和更高版本。使用非本地化的目标解析名称指出,作为快捷方式的文件名pszLinkTo。如果此标志没有设置,使用本地化的名称。
SHGNLI_USEURLEXT
0x000000020。 Windows 7和更高版本。追加1。URL文件(而不是扩展名。码配套),名称指向pszName。如果此标志没有设置,快捷方式的名称使用。码配套延伸,除非SHGNLI_NOLNK设置。
返回值
如果成功返回TRUE,否则返回FALSE。
备注
SHGetNewLinkInfo确定是否目标文件系统支持长文件名。如果是这样,长文件名用于快捷方式的名称。如果目标文件系统不支持长文件名,快捷方式的名称返回一个8.3格式。
在Windows 95/98/Me:SHGetNewLinkInfo是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98系统。
功能信息
最低DLL版本 shell32.dll版本4.71或更高版本
自定义ImplementationNo
Headershellapi.h
import libraryshell32.lib
2000年最低经营systemsWindows时,Windows NT 4.0与Internet Explorer 4.0,视窗98,视窗与Internet Explorer 4.0时,Windows 7 95
UnicodeImplemented为ANSI和Unicode版本。
==英文原文==SHGetNewLinkInfo Function
Creates a name for a new shortcut based on the shortcut's proposed target. This function does not create the shortcut, just the name.
Syntax
BOOL SHGetNewLinkInfo( LPCTSTR pszLinkTo,
LPCTSTR pszDir,
LPTSTR pszName,
BOOL *pfMustCopy,
UINT uFlags
);
Parameters
pszLinkTo
[in] A pointer to the path and file name of the shortcut's target. If uFlags does not contain the SHGNLI_PIDL value, this parameter is the address of a null-terminated string that contains the target. If uFlags contains the SHGNLI_PIDL value, this parameter is a pointer to an item identifier list (PIDL) that represents the target.
pszDir
[in] A pointer to a null-terminated string that contains the path of the folder in which the shortcut would be created.
pszName
[out] A pointer to a string that receives the null-terminated path and file name for the shortcut. This buffer is assumed to be at least MAX_PATH characters in size.
pfMustCopy
[out] The address of a BOOL value that receives a flag indicating whether the shortcut would be copied. When a shortcut to another shortcut is created, the Shell simply copies the target shortcut and modifies that copied shortcut appropriately. This parameter receives a nonzero value if the target specified in pszLinkTo specifies a shortcut that will cause the target shortcut to be copied. This parameter receives zero if the target does not specify a shortcut that would be copied.
uFlags
[in] The options for the function. This can be zero or a combination of the following values.
SHGNLI_PIDL
0x000000001. The target pointed to by pszLinkTo is a PIDL that represents the target. If this flag is not included, pszLinkTo is regarded as the address of a string that contains the path and file name of the target.
SHGNLI_NOUNIQUE
0x000000002. Skip the normal checks that ensure that the shortcut name is unique within the destination folder. If this flag is not included, the function creates the shortcut name and then determines whether the name is unique in the destination folder. If a file with the same name already exists in the destination folder, the shortcut name will be modified. This process is repeated until a unique name is found.
SHGNLI_PREFIXNAME
0x000000004. The created name will be preceded by the string "Shortcut to ".
SHGNLI_NOLNK
0x000000008. Version 5.0 Do not add the .lnk file name extension. You must set _WIN32_IE macro to 5.01 or greater to use this flag. For more information about versioning, see Shell and Common Controls Versions.
SHGNLI_NOLOCNAME
0x000000010. Windows Vista and later. Use the non-localized parsing name of the target pointed to by pszLinkTo as the name of the shortcut file. If this flag is not set, the localized name is used.
SHGNLI_USEURLEXT
0x000000020. Windows 7 and later. Append a .url file name extension (rather than .lnk) to the name pointed to by pszName. If this flag is not set, the shortcut name uses a .lnk extension unless SHGNLI_NOLNK is set.
Return Value
Returns TRUE if successful; otherwise, FALSE.
Remarks
SHGetNewLinkInfo determines whether the destination file system supports long file names. If it does, a long file name is used for the shortcut name. If the destination file system does not support long file names, the shortcut name is returned in an 8.3 format.
Windows 95/98/Me: SHGetNewLinkInfo is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows Me/98/95 Systems .
Function Information
Minimum DLL Versionshell32.dll version 4.71 or later
Custom ImplementationNo
Headershellapi.h
Import libraryshell32.lib
Minimum operating systemsWindows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0, Windows 7
UnicodeImplemented as ANSI and Unicode versions.
==原始网址==http://msdn.microsoft.com/en-us/library/bb762193(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 13:16:14