是否
DWORD WNetAddConnection2(
LPNETRESOURCE lpNetResource,
// points to structure that specifies connection details
LPCTSTR lpPassword, // points to password string
LPCTSTR lpUsername, // points to user name string
DWORD dwFlags // set of bit flags that specify connection options
);
typedef struct _NETRESOURCE { // nr
DWORD dwScope;
DWORD dwType;
DWORD dwDisplayType;
DWORD dwUsage;
LPTSTR lpLocalName;
LPTSTR lpRemoteName;
LPTSTR lpComment;
LPTSTR lpProvider;
} NETRESOURCE;
NETRESOURCE 之lpComment代表的是目录操作权限,要是的话,他的值是不是这样取的:?
FILE_SHARE_READ = $00000001;
{$EXTERNALSYM FILE_SHARE_READ}
FILE_SHARE_WRITE = $00000002;
{$EXTERNALSYM FILE_SHARE_WRITE}
FILE_SHARE_DELETE = $00000004;