The Sharp Develop IDE I use has a code conversion utility. When I convert the module with all of the startup routines in it to C#, I get this:
publicstaticvoidGet_Part_Editor()
{
//Creates a handle to the Parts Editor in Library Manager
try {
part_ed_dlg = Interaction.CreateObject("MGCPCBLibraries.PartsEditorDlg" + "." + prog_id.ToString());
} catch (Exception ex) {
Debug.Print("failing to create part editor session with this error: " + ex.Message);
proceed = false;
return;
}
pdb_db = part_ed_dlg.OpenDatabaseEx(job, false);
if (part_ed_dlg.LockServer()) {
//do nothing
} else {
Interaction.MsgBox("Could not lock database for writing");
}
}
I don't know what the Interaction does, but perhaps it can help.