Use DllImport for the WNetAddConnectionX method to authenticate against
\\comp\ipc$ with a username and password. If you don't specify a local name
for the connection, no drive is mapped - but the credentials are associated
with the computer. Then access the file and then remove the connection with
WNetCancelConnection.
Arild
"HK guy" <HK***@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
When I want to access a network share in C#
the link is
"\\\\comp\\share\\a.txt"
But if it require password, what can I do?
Since I don't want to map a drive.
Thank you