Exemple #1
0
 private static extern int psoFolderCreateObject( 
     IntPtr               folderHandle,
     string               objectName,
     UInt32               nameLengthInBytes,
     ref ObjectDefinition pDefinition,
     ref KeyDefinition    pKey,
     FieldDefinition []     pFields);
Exemple #2
0
 private static extern int psoCreateObject(
     IntPtr sessionHandle,
     string objectName,
     UInt32 nameLengthInBytes,
     ref ObjectDefinition definition,
     ref KeyDefinition    key,
     FieldDefinition[]  fields);
Exemple #3
0
        // --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
        public void CreateObject( String               objectName,
            ref ObjectDefinition definition,
            ref KeyDefinition    key,
            FieldDefinition[]    fields)
        {
            int rc;

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

            rc = psoCreateObject(handle,
                                 objectName,
                                 (UInt32)objectName.Length,
                                 ref definition,
                                 ref key,
                                 fields );
            if (rc != 0)
            {
                throw new PhotonException(PhotonException.PrepareException(handle, "Session.DestroyObject"), rc);
            }
        }
Exemple #4
0
        // --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
        public void CreateObject(String               objectName,
            ref ObjectDefinition pDefinition,
            ref KeyDefinition    pKey,
            FieldDefinition []   pFields)
        {
            int rc;

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

            rc = psoFolderCreateObject(handle,
                                       objectName,
                                       (UInt32)objectName.Length,
                                       ref pDefinition,
                                       ref pKey,
                                       pFields );
            if (rc != 0)
            {
                throw new PhotonException(PhotonException.PrepareException(sessionHandle, "Folder.CreateObject"), rc);
            }
        }