被安装的DLL主要代码:<br>unit mainform;<br>interface<br>uses<br> windows,messages;<br>const<br>exename
char='dll';<br>type<br> TWin = record<br> Msg:TMsg;<br> wClass:TWndClass;<br> hMain:integer;<br> end;<br>var<br> Win:TWin;<br> hInst,handle,newtimer:integer;<br>procedure run;stdcall;<br>implementation<br>function WindowProc(hWnd,Msg,wParam,lParam:longint):LRESULT; stdcall;<br>begin<br> case Msg of<br> WM_TIMER: MessageBox(handle,'hello','hello',0);<br> wm_destroy: halt;<br> end;<br> Result:=DefWindowProc(hWnd,Msg,wParam,lParam);<br>end;<br>function CreateMain(name
char):hwnd;<br>begin<br> hInst:=GetModuleHandle(nil);<br> win.wClass.lpfnWndProc:= @WindowProc;<br> win.wClass.hInstance:= hInstance;<br> win.wClass.lpszClassName:=name;<br> RegisterClass(win.wClass);<br> Result:=CreateWindowEx(ws_ex_toolwindow,win.wClass.lpszClassName,name,WS_CAPTION,0,0,1,1,0,0,hInstance,nil);<br>end;<br><br>procedure run;stdcall;<br>begin<br> handle:=CreateMain(exename);<br> newtimer:=SetTimer(handle,0,10000,nil);<br> while(GetMessage(win.Msg,win.hmain,0,0)) do<br> begin<br> TranslateMessage(win.Msg);<br> DispatchMessage(win.Msg);<br> end;<br> killtimer(handle,newtimer);<br>end;<br>end.<br><br>分不够,我可以加啊,高手给个答案!!!!!!!!!!!!