` Printed Icetips Article

Icetips Article



Windows API: map drives and logon to folders
2002-09-24 -- Jim Kane
 
Newsgroups: comp.lang.clarion


There are lots of ways. you can map a drive with WNetAddConnection2 (check
it out on msdn - depends on OS where the directory is to determnine whether
password is supported - needs to be nt,w2k,or xp server).
you can impersonate a user with logonuser()/followed by
impersonateloggedonuser() - again some OS differences.
or you can change either the acl or sid to get the two to match.  This is a
bit more difficult.  There is an msdn article "Howto:Set Security on a NTFS
Folder Programmatically" that I've used lots of times.
happy hunting
jim kane

"Paul Melevende"  wrote in message
news:3d911656@news.softvelocity.com...
> Hi All,
>
> Can anyone please advise me how to use password protection of a UNC data
> path? If we have a unc path (let say \\Server\Ddrive\folder) protected by
a
> password, our CW app reports an error when attempting to open the files. I
> guess that's good, but we want password protection AND the capability to
> have our data there.
>
> Any advice appreciated,
>
> Regards
> Paul Melevende
>
>
>



Printed May 3, 2024, 6:29 pm
This article has been viewed/printed 35111 times.
Google search has resulted in 58 hits on this article since January 25, 2004.