static void Main(string[] args) { Process proc = new Process(); BasicObjectDef definition = new BasicObjectDef(); FieldDefinition[] fields = new FieldDefinition[1]; try { proc.Init("10701", false); } catch(PhotonException e) { Console.WriteLine(e.ToString()); Console.WriteLine("Init"); Environment.Exit(e.ErrorCode()); } int rc = 0; Console.WriteLine("Init" + rc); Session sess = new Session(); definition.type = ObjectType.FOLDER; sess.CreateObject("/Test", ref definition, fields); sess.Commit(); ObjStatus status = new ObjStatus(); sess.GetStatus("/Test", ref status); }
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public Folder(Session session, String folderName ) { int rc; handle = (IntPtr)0; sessionHandle = session.handle; if (sessionHandle == (IntPtr)0) { rc = (int)PhotonErrors.NULL_HANDLE; throw new PhotonException(PhotonException.PrepareException("Folder.Folder", rc), rc); } rc = psoFolderOpen(sessionHandle, folderName, (UInt32)folderName.Length, ref handle); if (rc != 0) { throw new PhotonException(PhotonException.PrepareException(sessionHandle, "Folder.Folder"), rc); } }
public MyHash(Session session) : base(session) { dataPtr = Marshal.AllocHGlobal(Marshal.SizeOf(my)); }
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public FastMapEditor(Session session) { handle = (IntPtr)0; sessionHandle = session.handle; }
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public Queue(Session session) { handle = (IntPtr)0; sessionHandle = session.handle; }
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public Lifo(Session session) { handle = (IntPtr)0; sessionHandle = session.handle; }
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public HashMap(Session session) { handle = (IntPtr)0; sessionHandle = session.handle; }
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public Folder(Session session) { handle = (IntPtr)0; sessionHandle = session.handle; }