This is a sub that I wrote in VB.NET to change a layer's freeze state. With the quick research I did I could not find a mechanism for finding a specific layer without looping through them...
{code}
Sub freezeMe(ByRef tr As Transaction, ByVal lname As String, ByVal freeze As Boolean)
Dim lt As LayerTable = tr.GetObject(HostApplicationServices.WorkingDatabase.LayerTableId, OpenMode.ForWrite, False, False)
For Each i In lt
Dim tt As LayerTableRecord = tr.GetObject(i.GetObject(OpenMode.ForWrite).ObjectId, OpenMode.ForWrite, False, False)
If tt.Name = lname Then
tt.IsFrozen = freeze
End If
Next
End Sub
{code}
Each element in the LayerTableRecord has properties of the layers such as isFrozen, isLocked, etc. See the helpfiles for a full list of properties.
Opening a drawing is fairly well documented in the samples, helpfiles and on these forums.