rundll32

作者: 玻璃缸里的自游 | 来源:发表于2019-03-13 18:09 被阅读0次

windows系统通过rundll32提供直接运行dll的功能

此dll功能实现原型为:

  void CALLBACK
  EntryPoint(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);

例如在一个dll中定义一个输出函数如下:

extern "C" _declspec(dllexport) void __cdecl msgbox(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow)
{
    MessageBox(hwnd, "msgbox", lpszCmdLine, MB_OK);
    return;
}

生成dll文件(rundlltest.dll)后,可通过rundll32.exe直接运行显示此消息对话框。命令如下:
rundll32.exe rundlltest.dll,msgbox hello

参考:
https://support.microsoft.com/zh-cn/help/164787/info-windows-rundll-and-rundll32-interface

相关文章

网友评论

      本文标题:rundll32

      本文链接:https://www.haomeiwen.com/subject/umitmqtx.html