2020年4月

以前在给桌面快捷方式改图标的时候常用shell32.dll和后来的imageres.dll两个文件。这次突发奇想看能不能找到更多。以下是一些其他年代久远的图标合集。

shell32
moricons
pifmgr
compstui.dll
DDORes.dll
ieframe.dll
imageres.dll
mmcndmgr.dll
moricons.dll
netshell.dll
pnidui.dll
shell32.dll
wmploc.DLL

C:\Windows\Explorer.Exe
C:\Windows\System32\AccessibilityCpl.Dll
C:\Windows\System32\compstui.dll
C:\Windows\System32\Ddores.Dll
C:\Windows\System32\DDORes.dll
C:\Windows\System32\GameUx.Dll
C:\Windows\System32\imageres.dll
C:\Windows\System32\mmcndmgr.dll
C:\Windows\System32\mmRes.Dll
C:\Windows\System32\MorIcons.Dll
C:\Windows\System32\NetCenter.Dll
C:\Windows\System32\netshell.dll
C:\Windows\System32\networkexplorer.dll
C:\Windows\System32\PifMgr.dll
C:\Windows\System32\PniDui.Dll
C:\Windows\System32\SensorsCpl.Dll
C:\Windows\System32\SetupApi.Dll
C:\Windows\System32\Shell32.Dll
C:\Windows\System32\wmploc.DLL
C:\Windows\System32\wpdshext.dll

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace ThreadCallback
{
    class Program
    {
        public delegate int AddDelegate(int a, int b, int c);
        /// <summary>
        /// 计算类
        /// </summary>
        public class Calculation
        {
            /// <summary>
            /// 加法函数
            /// </summary>
            /// <param name="a"></param>
            /// <param name="b"></param>
            /// <param name="c"></param>
            /// <returns></returns>
            public static int Add(int a, int b, int c)
            {
                Console.WriteLine("\n开始计算:" + a + "+" + b + "+" + c);
                Thread.Sleep(3000); //模拟该方法运行三秒
                Console.WriteLine("计算完成!");
                return a + b + c;
            }
        }
        static void Main(string[] args)
        {
            Console.WriteLine("===== 异步回调 AsyncInvokeTest =====");
            // 实例化委托
            // AddDelegate addDelegate = Calculation.Add;
            AddDelegate addDelegate = new AddDelegate(Calculation.Add);
            //异步操作接口(注意BeginInvoke方法的不同!)
            IAsyncResult result = addDelegate.BeginInvoke(1, 2, 3, new AsyncCallback(CallbackFunc), "AsycState:OK");
            Console.WriteLine("------继续做别的事情。。。--------");
            Console.ReadKey();

        }
        /// <summary>
        /// 静态回调函数
        /// </summary>
        /// <param name="syncResult">异步操作状态</param>
        static void CallbackFunc(IAsyncResult syncResult)
        {
            //result 是“加法类.Add()方法”的返回值             
            //AsyncResult 是IAsyncResult接口的一个实现类,引用空间:System.Runtime.Remoting.Messaging             
            //AsyncDelegate 属性可以强制转换为用户定义的委托的实际类。

            // 获取异步结果
            var asyncResult = (AsyncResult)syncResult;
            // 获取异步委托对象
            var obj = asyncResult.AsyncDelegate;
            // 转换为委托类
            AddDelegate addDelegate = (AddDelegate)obj;
            // 结束线程获取返回值
            var res = addDelegate.EndInvoke(syncResult);
            Console.WriteLine(res);
            Console.WriteLine(syncResult.AsyncState);// 异步状态
        }
    }
}

参考:https://www.cnblogs.com/jiangyunfeng/p/10658141.html