Example #1
0
        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);
        }
Example #2
0
        // --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
        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);
            }
        }
Example #3
0
 public MyHash(Session session)
     : base(session)
 {
     dataPtr = Marshal.AllocHGlobal(Marshal.SizeOf(my));
 }
Example #4
0
 // --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
 public FastMapEditor(Session session)
 {
     handle = (IntPtr)0;
     sessionHandle = session.handle;
 }
Example #5
0
 // --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
 public Queue(Session session)
 {
     handle = (IntPtr)0;
     sessionHandle = session.handle;
 }
Example #6
0
 // --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
 public Lifo(Session session)
 {
     handle = (IntPtr)0;
     sessionHandle = session.handle;
 }
Example #7
0
 // --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
 public HashMap(Session session)
 {
     handle = (IntPtr)0;
     sessionHandle = session.handle;
 }
Example #8
0
 // --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
 public Folder(Session session)
 {
     handle = (IntPtr)0;
     sessionHandle = session.handle;
 }