public NdrEmbeddedPointer <T> ReadEmbeddedPointer <T>(Func <T> unmarshal_func)
        {
            int referent = ReadReferent();

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

            // Really should have referents, but I'm not convinced the MSRPC NDR engine uses them.
            // Perhaps introduce a lazy method to bind it after the fact.
            var deferred_reader = NdrEmbeddedPointer <T> .CreateDeferredReader(unmarshal_func);

            _deferred_reads.Enqueue(deferred_reader.Item2);
            return(deferred_reader.Item1);
        }
Beispiel #2
0
        public NdrEmbeddedPointer <T> ReadEmbeddedPointer <T>(Func <T> unmarshal_func, bool full_pointer)
        {
            int referent = ReadInt32();

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

            if (full_pointer)
            {
                unmarshal_func = () => ReadFullPointer(referent, unmarshal_func);
            }

            var deferred_reader = NdrEmbeddedPointer <T> .CreateDeferredReader(unmarshal_func);

            _deferred_reads.Enqueue(deferred_reader.Item2);
            return(deferred_reader.Item1);
        }