IVSSItem.Undocheckout(string filepath, int iflags) and file's readonly attributeHello,<br/><br/>I am trying to automate and use VSS functionality for an add-in I am currently developing. I use VS2005 and C#.NET as my IDE and programming language.<br/><br/>After I retrieved the VSSItem from source safe I checkedout it. Then I tried to undocheckout this item. What happens is the following:<br/><br/>Undocheckout worked (I run the Source Safe itsel and looked to see if it is undocheckoutted). However, the read-only attribute of the local file specified by VSSItem did not become read-only.<br/><br/>I passed the value <span style="font-size:x-small;color:#008080"><span style="font-size:x-small;color:#008080">SSFlags</span></span><span style="font-size:x-small">.VSSFLAG_DELNOREPLACE</span> to iFlags parameter of the VSSItem.Undocheckout method.<br/><br/>Despite that, local file's read-only attribute did not become enabled after a call to undocheckout. However, I see that if from my C# add-in application I checkout a file and then use the VS IDE to undocheckout the file, the file's read-only<br/>attribute enable again.<br/><br/>What I am doing wrong? Any help will be much appretiated.<br/><br/>Thank you<br/><br/><br/>© 2009 Microsoft Corporation. All rights reserved.Thu, 09 Jul 2009 02:46:15 Z279f89cd-1cc8-46ab-9c03-47eb783d4bb1http://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/279f89cd-1cc8-46ab-9c03-47eb783d4bb1#279f89cd-1cc8-46ab-9c03-47eb783d4bb1http://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/279f89cd-1cc8-46ab-9c03-47eb783d4bb1#279f89cd-1cc8-46ab-9c03-47eb783d4bb1msejderhttp://social.msdn.microsoft.com/Profile/en-US/?user=msejderIVSSItem.Undocheckout(string filepath, int iflags) and file's readonly attributeHello,<br/><br/>I am trying to automate and use VSS functionality for an add-in I am currently developing. I use VS2005 and C#.NET as my IDE and programming language.<br/><br/>After I retrieved the VSSItem from source safe I checkedout it. Then I tried to undocheckout this item. What happens is the following:<br/><br/>Undocheckout worked (I run the Source Safe itsel and looked to see if it is undocheckoutted). However, the read-only attribute of the local file specified by VSSItem did not become read-only.<br/><br/>I passed the value <span style="font-size:x-small;color:#008080"><span style="font-size:x-small;color:#008080">SSFlags</span></span><span style="font-size:x-small">.VSSFLAG_DELNOREPLACE</span> to iFlags parameter of the VSSItem.Undocheckout method.<br/><br/>Despite that, local file's read-only attribute did not become enabled after a call to undocheckout. However, I see that if from my C# add-in application I checkout a file and then use the VS IDE to undocheckout the file, the file's read-only<br/>attribute enable again.<br/><br/>What I am doing wrong? Any help will be much appretiated.<br/><br/>Thank you<br/><br/><br/>Wed, 01 Jul 2009 23:56:28 Z2009-07-01T23:56:28Zhttp://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/279f89cd-1cc8-46ab-9c03-47eb783d4bb1#649b6203-caee-46e8-bdbb-83011c828e49http://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/279f89cd-1cc8-46ab-9c03-47eb783d4bb1#649b6203-caee-46e8-bdbb-83011c828e49Cristian_thttp://social.msdn.microsoft.com/Profile/en-US/?user=Cristian_tIVSSItem.Undocheckout(string filepath, int iflags) and file's readonly attribute<p>Hi,<br/><br/><br/>Try using the default flag, VSSFLAG_DELNO for the UndoCheckout operation. By using this flag the read-only attribute will be preserved and the local copy will not be deleted. Read the online docs, available <a title="VSSFlags Enumeration" href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.sourcesafe.interop.vssflags(VS.80).aspx">here</a>, for more information.<br/><br/></p> <pre lang="x-c#">vssItem.UndoCheckout(item.LocalSpec, (int)(VSSFlags.VSSFLAG_DELNO));</pre> <p><br/><br/><br/>Cristi</p><hr class="sig">Cristian Trifan - Software DeveloperThu, 02 Jul 2009 11:50:13 Z2009-07-02T11:50:13Z