Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link 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"
Today is November 21, 2024, 6:59 am This article has been viewed 35210 times. Google search has resulted in 58 hits on this article since January 25, 2004.
|
|