Ejemplo n.º 1
0
        public static void EnumerateRemoteTargets(string host, RemoteConnectionFound callback)
        {
            IntPtr host_mem = CustomMarshal.MakeUTF8String(host);

            UInt32 nextIdent = 0;

            while (true)
            {
                // just a sanity check to make sure we don't hit some unexpected case
                UInt32 prevIdent = nextIdent;

                nextIdent = RENDERDOC_EnumerateRemoteTargets(host_mem, nextIdent);

                if (nextIdent == UInt32.MaxValue || prevIdent >= nextIdent)
                {
                    break;
                }

                callback(nextIdent);
            }

            CustomMarshal.Free(host_mem);
        }
Ejemplo n.º 2
0
        public static void EnumerateRemoteConnections(string host, RemoteConnectionFound callback)
        {
            IntPtr host_mem = CustomMarshal.MakeUTF8String(host);

            UInt32 nextIdent = 0;

            while (true)
            {
                // just a sanity check to make sure we don't hit some unexpected case
                UInt32 prevIdent = nextIdent;

                nextIdent = RENDERDOC_EnumerateRemoteConnections(host_mem, nextIdent);

                if (nextIdent == UInt32.MaxValue || prevIdent >= nextIdent)
                    break;

                callback(nextIdent);
            }

            CustomMarshal.Free(host_mem);
        }