全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1708
推到 Plurk!
推到 Facebook!

使用 DLL wizard 時找不到 toolintf.dcu

尚未結案
earlyu
一般會員


發表:5
回覆:0
積分:1
註冊:2005-05-09

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-08-11 14:47:53 IP:61.220.xxx.xxx 未訂閱
請問各位: 我new 一個 DLL Wizard 然後貼上以下的程式碼 (來自 Delphi3000.com) compile 的時候 他說 找不到 ExptIntf.dcu ToolInf.dcu 之類的 可是我找遍電腦 也找不到這些東西 請問一下各位,是不是我少了什麼步驟, 還是少加了什麼東西 請幫幫忙..... 謝謝 DelphiPlug.dll ----------------------------- library DelphiPlug; {%File 'uPlugIn.txvpck'} {%File 'default.txvpck'} {%File 'ModelSupport\default.txvpck'} uses ShareMem, ExptIntf, SysUtils, Classes, uPlugIn in 'uPlugIn.pas'; {$R *.res} exports InitExpert name ExpertEntryPoint; begin end. uPlugIn.pas ---------------------------------- unit uPlugIn; interface uses ToolIntf, EditIntf, ExptIntf, VirtIntf, Windows, Messages; const MIdx_Main = $0001; MIdx_ShowItems = $0002; MIdx_RunCommand = $0003; type TDelphiPlug = class(TIExpert) private protected public // abstract methods to be overriden { Expert UI strings } function GetName: string; override; stdcall; function GetAuthor: string; override; stdcall; function GetComment: string; override; stdcall; function GetPage: string; override; stdcall; {$IFDEF MSWINDOWS} function GetGlyph: HICON; override; stdcall; {$ENDIF} {$IFDEF LINUX} function GetGlyph: Cardinal; override; stdcall; {$ENDIF} function GetStyle: TExpertStyle; override; stdcall; function GetState: TExpertState; override; stdcall; function GetIDString: string; override; stdcall; function GetMenuText: string; override; stdcall; { Launch the Expert } procedure Execute; override; stdcall; end; function InitExpert(ToolServices: TIToolServices; RegisterProc: TExpertRegisterProc; var Terminate: TExpertTerminateProc): Boolean; export; stdcall; implementation uses SysUtils, ShellAPI; function InitExpert(ToolServices: TIToolServices; RegisterProc: TExpertRegisterProc; var Terminate: TExpertTerminateProc): Boolean; export; stdcall; var DelphiPlug: TDelphiPlug; begin Result := True; try ExptIntf.ToolServices := ToolServices; DelphiPlug := TDelphiPlug.Create; RegisterProc(DelphiPlug); except ToolServices.RaiseException(ReleaseException); end; end; { TDelphiPlug } procedure TDelphiPlug.Execute; begin // en: // Execute will be called, whenever the user clicks on the menu entry in the // help menu // de: // Execute wird aufgerufen, wenn der User auf den Eintrag im Hilfe-Menü // klickt MessageBox(ToolServices.GetParentHandle, 'How may I help you?', 'Hmm', MB_ICONQUESTION MB_OK); end; function TDelphiPlug.GetAuthor: string; begin // en: // returns the name of the author of the plugin // de: // liefert den Namen des Autoren des PlugIns zurück (wofür auch immer) Result := 'sakura (Daniel Wischnewski)'; end; function TDelphiPlug.GetComment: string; begin // en: // I got no idea where this comment will be displayed, ever. // de: // Auch hier weiß ich nicht, wo das jemals angezeigt wird, aber bitte... Result := 'A simple Delphi-PlugIn example.'; end; {$IFDEF MSWINDOWS} function TDelphiPlug.GetGlyph: HICON; begin // en: // an icon handle for the entry in the help menu // de: // Ein Icon-Handle fürs Menü Result := NOERROR; end; {$ENDIF} {$IFDEF LINUX} function TDelphiPlug.GetGlyph: Cardinal; begin // en: // an icon handle for the entry in the help menu // de: // Ein Icon-Handle fürs Menü Result := NOERROR; end; {$ENDIF} function TDelphiPlug.GetIDString: string; begin // en: // id of the expert // de: // ID des Experten Result := 'DelphiPlugSampleI'; end; function TDelphiPlug.GetMenuText: string; begin // en: // this text will be schon in the help menu. each time the menu drops down, // this method will be called. // NOTE: // the method GetState must return esStandard, otherwise the help menu // entry will not be generated and shown // // de: // Text der im Hilfe Menü angezeigt wird. Diese Funktion wird jedesmal // aufgerufen, wenn das Hilfemenü angezeigt wird. // HINWEIS: // die Methode GetState muß esStandard zurückliefern, damit dieser Eintrag // im Hilfemenü automatisch generiert wird Result := 'You''l find me in the help menu'; end; function TDelphiPlug.GetName: string; begin // en: // this name must be unique // de: // dieser Name muss!!! einmalig sein Result := 'sakura_DelphiPlugSample'; end; function TDelphiPlug.GetPage: string; begin // en: // interesting to experts expanding the default dialogs of the Delphi-IDE // de: // Ist für Experte interessant, welche Standard-Dialoge erweitern sollen Result := ''; end; function TDelphiPlug.GetState: TExpertState; begin // en: // returns a set of states // possible values: esEnabled, esChecked // de: // liefert ein Set von Stati zurück // mögliche Werte: esEnabled, esChecked Result := [esEnabled]; end; function TDelphiPlug.GetStyle: TExpertStyle; begin // en: // returns the type of expert // de: // liefert die Art des Experten zurück // mögliche Werte: esStandard, esForm, esProject, esAddIn Result := esStandard; end; end.
malanlk
尊榮會員


發表:20
回覆:694
積分:577
註冊:2004-04-19

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-08-11 15:28:52 IP:203.69.xxx.xxx 未訂閱
uses 區段有 ToolIntf, EditIntf, ExptIntf, VirtIntf... 既然你找不到 .dcu 那再找找看是否有對應的 .pas 如果有, 就加到程式所在路徑. 如果沒有, 就表示 範例程式用了一些三方元件, 沒有附給你....
系統時間:2024-06-01 23:27:54
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!