Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddConnection2 ¶
func AddConnection2(userName, password string, flags netresource.Option, resource netresource.Data) (err error)
AddConnection2 attempts to map the given local name to a remote resource. If persistent is true it creates a persistent connection that survives logon/logoff cycles. It calls the WNetAddConnection2 windows API function.
https://learn.microsoft.com/en-us/windows/win32/api/winnetwk/nf-winnetwk-wnetaddconnection2w
func CancelConnection2 ¶
func CancelConnection2(name string, flags netresource.Option, force bool) (err error)
CancelConnection2 attempts to unmap the given local resource name that has previously been mapped to a remote resource. It calls the WNetCancelConnection2W windows API function.
If the ConnectUpdateProfile flag is provided, the connection will be permanently removed from the user profile.
If force is true, it will forcefully close open files if necessary.
https://learn.microsoft.com/en-us/windows/win32/api/winnetwk/nf-winnetwk-wnetcancelconnection2w
func GetConnection ¶
GetConnection returns the remote resource that the given local name is mapped to. It calls the WNetGetConnectionW windows API function.
https://learn.microsoft.com/en-us/windows/win32/api/winnetwk/nf-winnetwk-wnetgetconnectionw
Types ¶
This section is empty.