I have a .Net application that (amongst other things) provides a front end to a sharepoint document library. Users are able to open documents, and I use the Open Documents Control to do so (http://msdn.microsoft.com/en-us/library/ms454230%28v=office.12%29.aspx).
Most of the time the documents should be opened in edit mode, but certain documents should only be opened in read only mode (say I have a custom 'Category' field on each document, and if the category equal to 10 then the document should be read only). I currently use the EditDocument3 method to open files (http://msdn.microsoft.com/en-us/library/cc264288%28v=office.12%29.aspx). However, I don't seem to see a way to open in a read only mode.
One thought I had would be to update the permissions of every user to only have Read access on that particular file, but I figured this would kill performance (some hundreds of users, some 160gb of files, documents changing from edit to read only fairly frequently).
Is there a way to flag a document as read only in sharepoint? I access sharepoint using c# through the object model.