Пример #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);
        }
Пример #2
0
        // --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
        public void Status(ref ObjStatus status)
        {
            int rc;

            if (sessionHandle == (IntPtr)0 || handle == (IntPtr)0)
            {
                rc = (int)PhotonErrors.NULL_HANDLE;
                throw new PhotonException(PhotonException.PrepareException("FastMapEditor.Status", rc), rc);
            }

            rc = psoFastMapStatus(handle, ref status);
            if (rc != 0)
            {
                throw new PhotonException(PhotonException.PrepareException(sessionHandle, "FastMapEditor.Status"), rc);
            }
        }
Пример #3
0
 private static extern int psoFolderStatus( 
     IntPtr        objectHandle,
     ref ObjStatus pStatus);
Пример #4
0
 private static extern int psoQueueStatus(
     IntPtr objectHandle,
     ref ObjStatus pStatus);
Пример #5
0
 internal static extern int psoFastMapStatus(
     IntPtr objectHandle,
     ref ObjStatus pStatus);
Пример #6
0
 private static extern int psoHashMapStatus(
     IntPtr objectHandle,
     ref ObjStatus pStatus);
Пример #7
0
        // --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
        public void GetStatus( String        objectName,
            ref ObjStatus status)
        {
            int rc;

            if (handle == (IntPtr)0)
            {
                rc = (int)PhotonErrors.NULL_HANDLE;
                throw new PhotonException(PhotonException.PrepareException("Session.GetStatus", rc), rc);
            }

            rc = psoGetStatus(handle,
                              objectName,
                              (UInt32)objectName.Length,
                              ref status);
            if (rc != 0)
            {
                throw new PhotonException(PhotonException.PrepareException(handle, "Session.GetStatus"), rc);
            }
        }
Пример #8
0
 private static extern int psoGetStatus(
     IntPtr sessionHandle,
     [MarshalAs(UnmanagedType.LPStr)] string objectName,
     UInt32 nameLengthInBytes,
     ref ObjStatus pStatus);