Exemplo n.º 1
0
        internal unsafe DirectoryVirtualListView RetrieveVLVResponse()
        {
            if (_disposed)
            {
                throw new ObjectDisposedException(GetType().Name);
            }

            // get the vlv response back
            AdsSearchColumn  column  = new AdsSearchColumn();
            AdsSearchColumn *pColumn = &column;

            SearchObject.GetColumn(Handle, _adsVLVResponseName, (INTPTR_INTPTRCAST)pColumn);
            try
            {
                AdsValue *pValue = column.pADsValues;
                DirectoryVirtualListView value = (DirectoryVirtualListView) new AdsValueHelper(*pValue).GetVlvValue();
                return(value);
            }
            finally
            {
                try
                {
                    SearchObject.FreeColumn((INTPTR_INTPTRCAST)pColumn);
                }
                catch (COMException)
                {
                }
            }
        }
Exemplo n.º 2
0
        internal unsafe byte[] RetrieveDirectorySynchronizationCookie()
        {
            if (_disposed)
            {
                throw new ObjectDisposedException(GetType().Name);
            }

            // get the dirsync cookie back
            AdsSearchColumn  column  = new AdsSearchColumn();
            AdsSearchColumn *pColumn = &column;

            SearchObject.GetColumn(Handle, _adsDirsynCookieName, (INTPTR_INTPTRCAST)pColumn);
            try
            {
                AdsValue *pValue = column.pADsValues;
                byte[]    value  = (byte[])new AdsValueHelper(*pValue).GetValue();

                return(value);
            }
            finally
            {
                try
                {
                    SearchObject.FreeColumn((INTPTR_INTPTRCAST)pColumn);
                }
                catch (COMException)
                {
                }
            }
        }