From: Robert Crandal on 9 Mar 2010 13:55 In a networked environment, it is possible for multiple users to open the same file simultaneously. I believe that the first user to open the file is allowed to have write access to the file, but anybody else who opens the file same gets "read only" access. Are there any API's I can use to enumerate through all username's of users who have opened a particular file? I am mostly interested in finding the username who has write access to the file, but if I can enumerate through all usernames who opened the file that would be fine too. Thank you!
From: Jonathan de Boyne Pollard on 12 Mar 2010 10:20 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <blockquote cite="mid:QQwln.73501$K81.9152(a)newsfe18.iad" type="cite"> <p>I believe that the first user to open the file is allowed to have write access to the file, but anybody else who opens the file same gets "read only" access. </p> </blockquote> <p>You believe incorrectly. The behaviour is whatever the application opening the file decides it to be. Win32 imposes no such restriction as you state. Win32 allows all application processes opening a file to have it open read-write, for example, if that is the sharing mode that they all agree upon.<br> </p> <p>You're thinking of Microsoft Office and SharePoint. It is they that enforce behaviour like the above, not Win32. They also agree on private application-level mechanisms such as "owner files" (q.v.). How one retrives such application-specific information is, of course, application specific. With WebDAV file locking, for example, one calls the <code>DavGetTheLockOwnerOfTheFile()</code> function in the WebDAV API.<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; font-size: 21px; font-weight: bold;"><br> </span></span></p> </body> </html>
From: Robert Crandal on 12 Mar 2010 16:03 Yes, I am trying to find something in Microsoft Office that will possibly let me enumerate through each user who currently has access to the current document. If we know which users are hogging the file at any given moment, this will be very useful. Nobody in the Office boards knew any "application specific" solutions, so I figured I would try the Win32 boards. I was thinking if I could find some Win32 API's that solved my problem, then possibly I could use such API's in either Microsoft Office or VBA. So far I have been told to use some of the API's below: * NetFileEnum() * NetFileGetInfo() * DavGetTheLockOwnerOfTheFile() I haven't played with these functions yet, but I'll test them soon. I hope they work! 8) "Jonathan de Boyne Pollard" <J.deBoynePollard-newsgroups(a)NTLWorld.COM> wrote in message news:IU.D20100312.T152034.P12709.Q0(a)J.de.Boyne.Pollard.localhost.. You're thinking of Microsoft Office and SharePoint. It is they that enforce behaviour like the above, not Win32. They also agree on private application-level mechanisms such as "owner files" (q.v.). How one retrives such application-specific information is, of course, application specific. With WebDAV file locking, for example, one calls the DavGetTheLockOwnerOfTheFile() function in the WebDAV API.
From: Jonathan de Boyne Pollard on 12 Mar 2010 18:31 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <blockquote cite="mid:h_xmn.250577$OX4.38631(a)newsfe25.iad" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <meta name="GENERATOR" content="MSHTML 8.00.6001.18882"> <style></style> <div> <p> <blockquote type="cite">You're thinking of Microsoft Office and SharePoint. It is they that enforce behaviour like the above, not Win32. They also agree on private application-level mechanisms such as "owner files" (q.v.). How one retrives such application-specific information is, of course, application specific. With WebDAV file locking, for example, one calls the <code>DavGetTheLockOwnerOfTheFile()</code> function in the WebDAV API.</blockquote> </p> <p>Yes, I am trying to find something in Microsoft Office that will possibly let me enumerate through each user who currently has access to the current document. [...] Nobody in the Office boards knew any "application specific" solutions, [...]</p> </div> </blockquote> <p>Then get them to tell you about owner files. Or just look up the concept in the MS KnowledgeBase yourself. (-:</p> </body> </html>
|
Pages: 1 Prev: Compressed PE executable Next: Looking for a sample program to show me how to write a program |