rundll32 shell32.dll,ShellAboutA 他妈的,不是这个。看看上面的“关于MZ”就知道了。rundll32 shell32.dll,ShellAboutA 不过,我觉得和这个类似。rundll32 shell32.dll,ShellAboutA 第一个回答正确的,给100分,谢谢大家。

解决方案 »

  1.   

    uses shellapi;ShellAbout(Handle, '关于记事本', '你要什么呀', hinstance);
      

  2.   

    我是想要知道记事本调用了哪个dll的哪个函数,不是实现不了。呵呵。不过还是要谢谢huojiehai(海天子),这么晚了还在看帖子。辛苦辛苦。
      

  3.   

    呵呵,我找了个介绍RunDll32的命令行用法的文章,很多用法,但没有你说的那个,明天继续帮你搞!!!!!!!!!!!!!..........你的帖子我喜欢....
      

  4.   

    这个是Delphi里的
    function ShellAbout; external shell32 name 'ShellAboutA';
      

  5.   

    可见的确用的是ShellAboutA,可惜,到了这里我就没有办法了。
    哥们帮忙看看吧。今天太晚了。该回去了。好累呀。
      

  6.   

    procedure WinAbout( Title : String; Caption : String);
    //Show ABOUT Box
    //549@23:10 2003-8-11
    begin
      ShellAbout( GetActiveWindow, PChar( Title ), PChar( Caption ), Application.Icon.Handle);
    end;
    //If the text contains a "#" separator, dividing it into two parts, the function displays the first part in the title bar, and the second part on the first line after the text "Microsoft Windows" or "Microsoft Windows NT."
    //Just call it like this :WinAbout('Title1#Title2','other');//Write '关于' yourself
    //And this :WinAbout('Title','other');//Windows Write '关于' for you
      

  7.   

    我偏要说ShellAboutW
    ******************
    rundll32 shell32.dll,ShellAboutW 不是的,这个用宽字符。所以你看到的是乱码。
      

  8.   

    看一下《Delphi深度历险》里面有提到我手边没带这本书
      

  9.   

    正如上面几位所说,用下而后两个都可以呀,不过我不知道哪个ICON是怎么加上去的。
    学习ing.
    我的操作系统:win2k Server. 不知道其它的操作系统是否有区别。
      ShellAbout(self.Handle,'My App','',MB_ICONWARNING);
      ShellAboutw(self.Handle,'我的应用程序','',MB_ICONWARNING);
      

  10.   

    uses shellapi;ShellAbout(Handle, '关于记事本', '你要什么呀', hinstance);
      

  11.   

    to: kkk2000(肥牛)
    我知道,已经封装了。有时间发给你。我现在不在公司。to: fengjn(小枫) 
    愿闻其详。
      

  12.   

    我要的是
    1.在命令行下输入命令,得到
    ShellAbout(Handle, '关于记事本', '你要什么呀', hinstance);
    这样的效果,当然,我不奢望实现hinstance这个ticon参数。2.shellabout是如何与shellabouta或者shellaboutw进行通讯的。大概是我表述不清,大家原谅。
      

  13.   

    function ShellAbout; external shell32 name 'ShellAboutA';//给直接学delphi的人
    function ShellAboutA; external shell32 name 'ShellAboutA';//给那些熟悉api的人
    function ShellAboutW; external shell32 name 'ShellAboutW';
    至于我说记事本是使用ShellAboutW的根据已经发到你的信箱中了,是一个图片,没办法贴出来。
      

  14.   

    收到了,可是这让问题更加复杂了。
    //*****************************************
    1.在命令行下输入命令,得到
    ShellAbout(Handle, '关于记事本', '你要什么呀', hinstance);
    这样的效果,当然,我不奢望实现hinstance这个ticon参数。在DOS下输入unicode似乎不行,也许是我理解有问题这个ShellAboutW理解有问题我认为这个是unicode的理由如下:
    function ShellAboutW(Wnd: HWND; szApp, szOtherStuff: PWideChar; Icon: HICON): Integer; stdcall;2.shellabout是如何与shellabouta或者shellaboutw进行通讯的。
      

  15.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, Menus;type
      TForm1 = class(TForm)
        MainMenu1: TMainMenu;
        a1: TMenuItem;
        miNewChild: TMenuItem;
        procedure FormCreate(Sender: TObject);
        procedure FormDestroy(Sender: TObject);
        procedure miNewChildClick(Sender: TObject);
      private
        FPrevWndProc, FNewWndProc: TFarProc;
        procedure ClientWndProc(var Message: TMessage);
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementationuses Unit2;{$R *.dfm}procedure TForm1.ClientWndProc(var Message: TMessage);
    begin
      with Message do
      begin
        case Msg of
          WM_NCACTIVATE,
          WM_NCCALCSIZE:
            SetWindowLong(ClientHandle, GWL_EXSTYLE, GetWindowLong(ClientHandle, GWL_EXSTYLE) and not WS_EX_CLIENTEDGE);
        end;
        Result := CallWindowProc(FPrevWndProc, ClientHandle, Msg, WParam, LParam);
      end;
    end;procedure TForm1.FormCreate(Sender: TObject);
    begin
      if ClientHandle <> 0 then
      begin
        FNewWndProc := MakeObjectInstance(ClientWndProc);
        FPrevWndProc := Pointer(GetWindowLong(ClientHandle, GWL_WNDPROC));
        SetWindowLong(ClientHandle, GWL_WNDPROC, Integer(FNewWndProc));
      end;
    end;procedure TForm1.FormDestroy(Sender: TObject);
    begin
      if ClientHandle <> 0 then
      begin
        SetWindowLong(ClientHandle, GWL_WNDPROC, Integer(FPrevWndProc));
        FreeObjectInstance(FNewWndProc);
      end;
    end;procedure TForm1.miNewChildClick(Sender: TObject);
    begin
      with TForm2.Create(Application) do Show;
    end;end.
    --------------------------------------------------------------------------------
    unit Unit2;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs;type
      TForm2 = class(TForm)
        procedure FormClose(Sender: TObject; var Action: TCloseAction);
      private
        { Private declarations }
      public
        { Public declarations }
      end;{var
      Form2: TForm2;}implementation{$R *.dfm}procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
    begin
      Action := caFree;
    end;end.
      

  16.   

    该问题已结帖DWGZ() 得分 -10000000000000000删除回复扣除 DWGZ() 信誉分 105
      

  17.   

    {$EXTERNALSYM ShellAbout}
    function ShellAbout(Wnd: HWND; szApp, szOtherStuff: PChar; Icon: HICON): Integer; stdcall;
    {$EXTERNALSYM ShellAboutA}
    function ShellAboutA(Wnd: HWND; szApp, szOtherStuff: PAnsiChar; Icon: HICON): Integer; stdcall;
    {$EXTERNALSYM ShellAboutW}
    function ShellAboutW(Wnd: HWND; szApp, szOtherStuff: PWideChar; Icon: HICON): Integer; stdcall;function ShellAbout; external shell32 name 'ShellAboutA';
    function ShellAboutA; external shell32 name 'ShellAboutA';
    function ShellAboutW; external shell32 name 'ShellAboutW';
      

  18.   

    对于Delphi的默认设置(String=AnsiString)
    ShellAbout和ShellAboutA是一样的。
      

  19.   

    var
      pw : PWideChar;
    begin
      pw := AllocMem( 255 );
      StringToWideChar( '随便写点什么', pw, 255);
      ShellAboutW( GetActiveWindow, pw, pw, 0);
      FreeMem( pw );
    end;
    //我明白了第二个问题,第一个问题似乎不应该在这里问。
    //散分吧,到别的版问问。
      

  20.   

    找到答案了。
    感谢weion(wei)
    ***************************8
    我来证明一下用命令行不能实现:
    我使用2003 SERVER,我用EXESCOPE查看了SHELL32的资源,很明显,ShellAboutA调用了一个对话框资源,ID为14352,现在的问题就是在命令行方式下能不能把要表达的参数传达给ShellAboutA(顺便说一下,NOTEPAD调用的应该是ShellAboutW),答案是不能。
    原因在于:
    楼上几位仁兄已经深入剖析了该函数的工作原理,但显然RUNDLL32不能处理传入的多个参数,特别是字符串参数,因为要区别多个字符串参数,需要在字符串末尾加入/0,RUNDLL32没有做这样的处理,在命令行方式下也不可能输入/0。
    由于参数传递一般都使用堆栈,这样输入的参数就改变了用户的声明部分,而之所以出现MZ,熟悉汇编的想一下就清楚了,内存块的头部标志就是这两个字母,这里已经发生了内存溢出现象.这是W2K一个安全漏洞,2003似乎已经改进了。原帖:http://expert.csdn.net/Expert/topic/2140/2140703.xml?temp=.3685877