public unsafe InfoQueueFilter GetRetrievalFilter()
        {
            var sizeFilter = PointerSize.Zero;

            GetRetrievalFilter(IntPtr.Zero, ref sizeFilter);

            if (sizeFilter == 0)
            {
                return(null);
            }
            var filter = stackalloc byte[(int)sizeFilter];

            GetRetrievalFilter((IntPtr)filter, ref sizeFilter);

            var queueNative = new InfoQueueFilter();

            queueNative.__MarshalFrom(ref *(InfoQueueFilter.__Native *)filter);

            return(queueNative);
        }
Example #2
0
        public unsafe InfoQueueFilter GetStorageFilter()
        {
            PointerSize sizeFilter = PointerSize.Zero;

            GetStorageFilter(IntPtr.Zero, ref sizeFilter);

            if (sizeFilter == 0)
            {
                return(null);
            }

            byte *filter = stackalloc byte[sizeFilter];

            GetStorageFilter((IntPtr)filter, ref sizeFilter);

            InfoQueueFilter queueNative = new InfoQueueFilter();

            queueNative.__MarshalFrom(ref *(InfoQueueFilter.__Native *)filter);
            return(queueNative);
        }