示例#1
0
        private void LoadActivatedServers()
        {
            try
            {
                _lock.EnterWriteLock();

                Native.ActivatedServerCallback serverCallback = (serverName, _) =>
                {
                    _activated.Add(serverName, new MediaController(this, serverName));
                    return(true);
                };

                Native.ForeachActivatedServer(Handle, serverCallback, IntPtr.Zero).
                ThrowIfError("Failed to get activated servers.");
            }
            finally
            {
                _lock.ExitWriteLock();
            }
        }