网站首页  词典首页

请输入您要查询的函数:

 

术语 createsymboliclink
释义 CreateSymbolicLink
语法:
C++
BOOLEAN WINAPI CreateSymbolicLink(
__in LPTSTR lpSymlinkFileName,
__in LPTSTR lpTargetFileName,
__in DWORD dwFlags
);
CreateSymbolicLink功能
创建一个符号链接。
作为一个要执行此操作的事务操作,请使用CreateSymbolicLinkTransacted功能。
参数
lpSymlinkFileName [in]
符号链接被创建。
lpTargetFileName [in]
在为符号链接的目标要创建的名称。
如果lpTargetFileName有一个设备的名称与其相关联,该链接被视为绝对的联系,否则,该链接为相对链接处理。
dwFlags [in]
指示是否链接的目标,lpTargetFileName,是一个目录。
ValueMeaning
0x0The链接目标是一个文件。
SYMBOLIC_LINK_FLAG_DIRECTORY
0x1The链接目标是一个目录。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
符号连接可以是绝对的或相对链接。绝对链接是链接指定的每个路径名称的一部分;相对链接决心相对的地方相对链接说明符在指定的路径。相关链接指定使用下列约定:
点(。和..)公约,例如,“.. \\”解决的路径相对于父目录。
没有斜线名称(\\),例如,“tmp”的解析路径相对于当前目录。
相对的,例如根,“\\窗口\\ System32”解析<当前驱动器>:\\窗口\\ System32。
当前的工作目录相对,例如,如果当前的工作目录是c:\\窗户\\ system32中的“C:file.txt”解析到c:\\的Windows \\ System32 \\ file.txt。
注意:如果您指定一个当前工作目录相对链接,这是一个绝对的链接创建,由于当前的工作目录的基础上处理用户和线程方式。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesCreateSymbolicLinkW(Unicode)和CreateSymbolicLinkA(ANSI)的
参见
CreateSymbolicLinkTransacted
文件管理函数
符号链接
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==CreateSymbolicLink Function
Creates a symbolic link.
To perform this operation as a transacted operation, use the CreateSymbolicLinkTransacted function.
Syntax
C++
BOOLEAN WINAPI CreateSymbolicLink(
__in LPTSTR lpSymlinkFileName,
__in LPTSTR lpTargetFileName,
__in DWORD dwFlags
);
Parameters
lpSymlinkFileName [in]
The symbolic link to be created.
lpTargetFileName [in]
The name of the target for the symbolic link to be created.
If lpTargetFileName has a device name associated with it, the link is treated as an absolute link; otherwise, the link is treated as a relative link.
dwFlags [in]
Indicates whether the link target, lpTargetFileName, is a directory.
ValueMeaning
0x0The link target is a file.
SYMBOLIC_LINK_FLAG_DIRECTORY
0x1The link target is a directory.

Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
Symbolic links can either be absolute or relative links. Absolute links are links that specify each portion of the path name; relative links are determined relative to where relative–link specifiers are in a specified path. Relative links are specified using the following conventions:
Dot (. and ..) conventions—for example, "..\\" resolves the path relative to the parent directory.
Names with no slashes (\\)—for example, "tmp" resolves the path relative to the current directory.
Root relative—for example, "\\windows\\system32" resolves to :\\windows\\system32.
Current working directory–relative—for example, if the current working directory is c:\\windows\\system32, "c:file.txt" resolves to c:\\windows\\system32\\file.txt.
Note If you specify a current working directory–relative link, it is created as an absolute link, due to the way the current working directory is processed based on the user and the thread.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesCreateSymbolicLinkW (Unicode) and CreateSymbolicLinkA (ANSI)
See Also
CreateSymbolicLinkTransacted
File Management Functions
Symbolic Links
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363866(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:03