无法定位程序输入点@Consts@_SRestoreDefaulnetschedulejobadd于动态链接库vcl60.bpl

2553人阅读
nDelphi IDE
Delph 3(DLLs)DelphiDLL(Borland.bpl)Delphi.bplexe.dll.exe.d11
VCLDelphi(C++Builder)Delphi lDelphi 2DelphiVCL150k200kDLLDLL
1.1& 为何要用包
1.1.1& 精简代码
DLLDelphiVCLDelphi
1.1.2& 发布更小的应用程序&&应用程序分割
Internet()
1.1.3& 组件容器
DLLDLLForms.pasWindowsWindowsDLLDLLDLLForms.pas
1.2 为何不用包
?200k30kVcl60.dcp2MDelphi IDE
1.3& 包的类型
nDelphi IDE/Delphi
1.4 包文件
表 1.1 包文件
.dpkDelphi.dpr
Delphi IDE
WindowsDLL.dcp
1.5使用运行期包
&&& DelphiProject OptionsPackagesBuild wlth Runtime Package& .exe.d11()
1.6& 把包安装到DeIphi IDE中
DeIphi IDEDelphi
表1.2 包文件的存放位置
Windows/system/Windows95/98WinNT/System32/Windows NT/2000
/Delphi 6//PKG
DCU/Delphi 6/LibDCUDCU/Delphi 6/3PrtyLib*.dcu
Delphi 6Component | Install PackagesProject OptionsPackages
Add.bplProjectOKDclphi IDE
1.7 创建包
1.7.1& 包编辑器
Object RepositoryPackages( DelphiFile | New | OtherObject Repository)ContainsRequires
1. Contains
ContainsContains
ncontainsuses
ncontains(usescontains)requires
ncontainscontains
2. Requires
RequiresDelphiusesrequiresVCL60DelphiVCLrequiresRequires
nPackagelrequiresrequiresPackage1
Delphi 6Package Editor
1.7.2 包设计方案
1.1(ddgDT60.dpk)()(ddgRT60.dpk)(ddgRT60.dpk)requires1.1
图1.1 设计期包包含了设计元素和运行期包
Package Options(Options)DdgRT60.dpkRuntime only IDE()DdgRT60.dpkDesign time onlyIDE
DelphiIDEIDEDelphiRegister()RegisterComponents()Delphi IDERegisterComponents()Register ()RegisterComponents()Delphi IDE
DdgRT60.dpkDdgReg.pasDdgDT60.dpkDdgDT60.dpkDdgRT60.dpkrequires1.1
程序1.1 Delphi6开发向导中包含的组件注册单元
Unit DDGReg
Procedure R
Implementation
&& Classes, ExptIntf, DsgnIntf, TrayIcon, AppBars, ABExpt, Worthless, RunBtn, PwDlg, Planets, LbTab, HalfMin, DDGClock, ExMemo, MenView, Marquee, PlanetPE, RunBtnPE, CompEdit, DefProp, Wavez, WavezEd, LnchPad, LPadPE, Cards, ButtonEdit, Planet, DrwP
Procedure R
&&&&&& //Register the components
& RegisterComponents('DDG',[TddgTrayNotifyIcon, TddDigitalClock, TddgHalfMinute, TddgButtonEdit, TddgExtendedMemo, &&&&&& &&TddgTabListbox, TddgRunButton, TddgLaunchPadm, TddgMenView, TddgMarquee, TddgWaveFile, TddgCard, TddgPasswordDialog, TddgPlanet, TddgPlanets, TddgWorthLess, TddgDrawPanel, TComponentEditorSample, TDefinePropTest]);
& //Register any property editor
& RegisterPropertyEditor(TypeInfo(TRunButton),TddgLaunchPad,'',TRunButtonProperty);
& RegisterpropertyEditor(TypeInfo(TWaveFileString), TddgWaveFile, 'WaveName',TWaveFileStringProperty);
& RegisterpropertyEditor(TddgWaveFile, TWaveEditor);
& RegisterpropertyEditor(TComponentEdtiorSample, TSampleEditor);
& RegisterpropertyEditor(TypeInfo(TPlanetName), TddgPlanet, 'PlanetName', TPlanetNameProperty);
& RegisterpropertyEditor(TypeInfo(TCommandLine), TddgRunButton,'', TCommandLineProperty);
& RegisterCustomModule(TAppBar, TCustomModule);
& RegisterLibraryExpert(TAappBarExpert.Create);
requiresDelphi IDE*.dcu
DdgDT60.bplDdgRT60.bpl*.dcp*.dcuDdgRT60.bpl
DdgDT6.bp1DdgDT6.dcp(*.dcu)
()IDEDelphi IDEIDE*.bpl
*.bplDelphi IDE
1.8 包的版本化
DelphiDelphi 6Delphi 5Borland(code base)Delphi 66.0
1.9 包编译器指示符
表1.3 被打包的单元的编译器指示符
{$G} or {IMPORTEDDATA OFF}
{$WEAKPACKAGEUNIT}{$WEAKPACKAGEUNIT}
{$DENYPACKAGEUNIT}
{$WEAKPACKAGEUNIT}
{$WEAKPACKAGEUNIT}
表1.4 Package.dpk文件的编译器指示符
{$DESIGNONLY ON}
{$RUNONLY ON}
{$IMPLICITBUILD OFF}
{$WEAKPACKAGEUNIT}
(weak package)(DLL)Vcl60WindowsWinn32 APIDLLDLL{$WEAKPACKAGEUNIT}DCPBPL(DCPDCUBPLDLL)
{$WEAKPACKAGEUNIT}DelphiDLLDLLDelphiVcl60.bplDLLDLLPENWIN.DLLVcl60.bplDLLVcl60.bplDelphiDelphiVcl60Delphi IDEVcl60.bpl
1.10 包的命名约定
6Delphi(DdgRT6.dpk)(DdgDT6.dpk)DdgRT5.dpkDelphi3/RTDTDelphi
1.11 使用运行期(插件)包的可扩展应用程序
3(ChildTest.exe)TchildForm(AIChildFrm6.bpl)TChildForM
AIChildFrm6.bplChildFormTchildFormconcreteTchildForm
AIChildFrm6.bplAIChildFm6.dcpAIChildFrm6.dcpTChildFormTchildForm(initialization)(finalization)
Initialization
& RegisterClass(TCF2Form);
Finalization
& UnRegisterClass(TCF2Form);
TChildFormRegisterClass()RegisterComponents()Delphi IDEUnRegisterlass()RegisterClass()??1.2
程序1.2 使用插件包的主程序的主窗体
unit MainF
& Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
& StdCtrls, ExtCtrls, ChildFrm, M
& { Child form registration location in the Windows Registry. }
& cAddInIniFile& = 'AddIn.ini';
& cCFRegSection& = 'ChildForms';& // Module initialization data section
& FMainCaption&& = 'Delphi 6 Developer''s Guide Child Form Demo';
& TChildFormClass = class of TChildF
& TMainForm = class(TForm)
&&& pnlMain: TP
&&& Splitter1: TS
&&& pnlParent: TP
&&& mmMain: TMainM
&&& mmiFile: TMenuI
&&& mmiExit: TMenuI
&&& mmiHelp: TMenuI
&&& mmiForms: TMenuI
&&& procedure mmiExitClick(Sender: TObject);
&&& procedure FormCreate(Sender: TObject);
&&& procedure FormDestroy(Sender: TObject);
&&& // reference to the child form.
&&& FChildForm: TChildF
&&& // a list of available child forms used to build a menu.
&&& FChildFormList: TStringL
&&& // Index to the Close Form menu which shifts position.
&&& FCloseFormIndex: I
&&& // Handle to the currently loaded package.
&&& FCurrentModuleHandle: HM
&&& // method to create menus for available child forms.
&&& procedure CreateChildFormM
&&& // Handler to load a child form and its package.
&&& procedure LoadChildFormOnClick(Sender: TObject);
&&& // Handler to unload a child form and its package.
&&& procedure CloseFormOnClick(Sender: TObject);
&&& // Method to retrieve the classname for a TChildForm descendant
&&& function GetChildFormClassName(const AModuleName: String): S
&&& { Public declarations }
& MainForm: TMainF
implementation
{$R *.DFM}
function RemoveExt(const AFileName: String): S
{ Helper function to removes the extension from a file name. }
& if Pos('.', AFileName) && 0 then
&&& Result := Copy(AFileName, 1, Pos('.', AFileName)-1)
&&& Result := AFileN
procedure TMainForm.mmiExitClick(Sender: TObject);
procedure TMainForm.FormCreate(Sender: TObject);
& FChildFormList := TStringList.C
& CreateChildFormM
procedure TMainForm.FormDestroy(Sender: TObject);
& FChildFormList.F
& // Unload any loaded child forms.
&&if FCurrentModuleHandle && 0 then
&&& CloseFormOnClick(nil);
procedure TMainForm.CreateChildFormM
{ All available child forms are registered in the Windows Registry.
& Here, we use this information to creates menu items for loading each of the
& child forms. }
& IniFile: TIniF
& MenuItem: TMenuI
& { Retrieve a list of all child forms and build a menu based on the
&&& entries in the registry. }
& IniFile := TIniFile.Create(ExtractFilePath(Application.ExeName)+cAddInIniFile);
&&& IniFile.ReadSectionValues(cCFRegSection, FChildFormList);
&&& IniFile.F
& { Add Menu items for each module. NOTE THE mmMain.AutoHotKeys property must
&&& bet set to maAutomatic }
& for i := 0 to FChildFormList.Count - 1 do
&&& MenuItem := TMenuItem.Create(mmMain);
&&& MenuItem.Caption := FChildFormList.Names[i];
&&& MenuItem.OnClick := LoadChildFormOnC
&&& mmiForms.Add(MenuItem);
& // Create Separator
& MenuItem := TMenuItem.Create(mmMain);
& MenuItem.Caption := '-';
& mmiForms.Add(MenuItem);
& // Create Close Module menu item
& MenuItem := TMenuItem.Create(mmMain);
& MenuItem.Caption := '&Close Form';
& MenuItem.OnClick := CloseFormOnC
& MenuItem.Enabled := F
& mmiForms.Add(MenuItem);
& { Save a reference to the index of the menu item required to
&&& close a child form. This will be referred to in another method. }
& FCloseFormIndex := MenuItem.MenuI
procedure TMainForm.LoadChildFormOnClick(Sender: TObject);
& ChildFormClassName: S
& ChildFormClass: TChildFormC
& ChildFormName: S
& ChildFormPackage: S
& // The menu caption represents the module name.
& ChildFormName := (Sender as TMenuItem).C
& // Get the actual Package file name.
& ChildFormPackage := FChildFormList.Values[ChildFormName];
& // Unload any previously loaded packages.
& if FCurrentModuleHandle && 0 then
&&& CloseFormOnClick(nil);
&&& // Load the specified package
&&& FCurrentModuleHandle := LoadPackage(ChildFormPackage);
&&& // Return the classname that needs to be created
&&& ChildFormClassName := GetChildFormClassName(ChildFormPackage);
&&& { Create an instance of the class using the FindClass() procedure. Note,
&&&&& this requires that the class already be registered with the streaming
&&&&& system using RegisterClass().& This is done in the child form
&&&&& initialization section for each child form package. }
&&& ChildFormClass := TChildFormClass(FindClass(ChildFormClassName));
&&& FChildForm := ChildFormClass.Create(self, pnlParent);
&&& Caption := FChildForm.GetC
&&& { Merge child form menus with the main menu }
&&& if FChildForm.GetMainMenu && nil then
&&&&& mmMain.Merge(FChildForm.GetMainMenu);
&&& FChildForm.S
&&& mmiForms[FCloseFormIndex].Enabled := T
&&& on E: Exception do
&&&&& CloseFormOnClick(nil);
function TMainForm.GetChildFormClassName(const AModuleName: String): S
{ The Actual class name of the TChildForm implementation resides in the
& registry. This method retrieves that class name. }
& IniFile: TIniF
& IniFile := TIniFile.Create(ExtractFilePath(Application.ExeName)+cAddInIniFile);
&&& Result := IniFile.ReadString(RemoveExt(AModuleName), 'ClassName',
&&&&& EmptyStr);
&&& IniFile.F
procedure TMainForm.CloseFormOnClick(Sender: TObject);
& if FCurrentModuleHandle && 0 then
&&& if FChildForm && nil then
&&&&& FChildForm.F
&&&&& FChildForm :=
&&& // Unregister any classes provided by the module
&&& UnRegisterModuleClasses(FCurrentModuleHandle);
&&& // Unload the child form package
&&& UnloadPackage(FCurrentModuleHandle);
&&& FCurrentModuleHandle := 0;
&&& mmiForms[FCloseFormIndex].Enabled := F
&&& Caption := FMainC
LoadChildFormOnClick()LoadPackage()LoadPackage()DLLLoadLibrary()LoadChildFormOnClick()
TbuttonTform1TchildFormsFindClass()
ChildFormClass := TchildFormClass(FindClass(ChildFormClassName));
FchildForm := ChildFormClass.Create(self, pnlParent);
VCLRegisterClass()FindClass()
ChildFormClassTchildFormTchildForm
CloseFormOnClick()INI
1.12 从包中导出函数
程序1.3 有两个导出函数的包单元
unit FunkF
& Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
& Dialogs, StdC
& TFunkForm = class(TForm)
&&& Label1: TL
&&& Button1: TB
&&& { Private declarations }
&&& { Public declarations }
// Declare the package functions using the StdCall calling convention
procedure FunkF
function AddEm(Op1, Op2: Integer): I
// Export the functions.
& FunkForm,
implementation
{$R *.dfm}
procedure FunkF
& FunkForm: TFunkF
& FunkForm := TFunkForm.Create(Application);
&&& FunkForm.ShowM
&&& FunkForm.F
function AddEm(Op1, Op2: Integer): I
& Result := Op1+Op2;
FunkForm()AdEmStdCall
程序1.4 应用程序演示
unit MainF
& Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
& Dialogs, StdCtrls, M
& cFunkForm = 'FunkForm';
& cAddEm&&& = 'AddEm';
& TForm1 = class(TForm)
&&& btnPkgForm: TB
&&& meOp1: TMaskE
&&& meOp2: TMaskE
&&& btnAdd: TB
&&& lblPlus: TL
&&& lblEquals: TL
&&& lblResult: TL
&&& procedure btnAddClick(Sender: TObject);
&&& procedure btnPkgFormClick(Sender: TObject);
&&& { Private declarations }
&&& { Public declarations }
& // Defined the method signatures
& TAddEmProc = function(Op1, Op2: Integer):
& TFunkFormProc =
& Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btnAddClick(Sender: TObject);
& PackageModule: TH
& AddEmProc: TAddEmP
& Op1, Op2:
& PackageModule := LoadPackage('ddgPackFunk.bpl');
&&& @AddEmProc := GetProcAddress(PackageModule, PChar(cAddEm));
&&& if not (@AddEmProc = nil) then
&&&&& Op1 := StrToInt(meOp1.Text);
&&&&& Op2 := StrToInt(meOp2.Text);
&&&&& Rslt := AddEmProc(Op1, Op2);
&&&&& lblResult.Caption := IntToStr(Rslt);
&&& UnloadPackage(PackageModule);
procedure TForm1.btnPkgFormClick(Sender: TObject);
& PackageModule: TH
& FunkFormProc: TFunkFormP
& PackageModule := LoadPackage('ddgPackFunk.bpl');
&&& @FunkFormProc := GetProcAddress(PackageModule, PChar(cFunkForm));
&&& if not (@FunkFormProc = nil) then
&&&&& FunkFormP
&&& UnloadPackage(PackageModule);
TAddEmProcTFunkFormProc
btnPkgFormClick()LoadLibrary()LoadPackage()LoadPackage()LoadLibrary()GetProcAddress()CFunkForm
1.13 获取包的信息
EnumModules()GetPackageInfo()
(callback functions)1.5
程序1.5 包信息演示
unit MainF
& Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
& Dialogs, StdCtrls, ComCtrls, DBXpress, DB, SqlExpr, DBT
& TForm1 = class(TForm)
&&& Button1: TB
&&& TreeView1: TTreeV
&&& Table1: TT
&&& SQLConnection1: TSQLC
&&& procedure Button1Click(Sender: TObject);
&&& { Private declarations }
&&& { Public declarations }
& Form1: TForm1;
implementation
{$R *.dfm}
& TNodeHolder = class
&&& ContainsNode: TTreeN
&&& RequiresNode: TTreeN
procedure RealizeLength(var S: string);
& SetLength(S, StrLen(PChar(S)));
procedure PackageInfoProc(const Name: NameType:
& TNameT Flags: B Param: Pointer);
& NodeHolder: TNodeH
& TempStr: S
& with Form1.TreeView1.Items do
&&& TempStr := EmptyS
&&& if (Flags and ufMainUnit) && 0 then
&&&&& TempStr := 'Main unit'
&&& else if (Flags and ufPackageUnit) && 0 then
&&&&& TempStr := 'Package unit' else
&&& if (Flags and ufWeakUnit) && 0 then
&&&&& TempStr := 'Weak unit';
&&& if TempStr && EmptyStr then
&&&&& TempStr := Format(' (%s)', [TempStr]);
&&& NodeHolder := TNodeHolder(Param);
&&& case NameType of
&&&&& ntContainsUnit: AddChild(NodeHolder.ContainsNode,
&&&&&&& Format('%s %s', [Name,TempStr]));
&&&&& ntRequiresPackage: AddChild(NodeHolder.RequiresNode, Name);
function EnumModuleProc(HInstance: Data: Pointer): B
& ModFileName: S
& ModNode: TTreeN
& ContainsNode: TTreeN
& RequiresNode: TTreeN
& ModDesc: S
& Flags: I
& NodeHolder: TNodeH
& with Form1.TreeView1 do
&&& SetLength(ModFileName, 255);
&&& GetModuleFileName(HInstance, PChar(ModFileName), 255);
&&& RealizeLength(ModFileName);
&&& ModNode := Items.Add(nil, ModFileName);
&&& ModDesc := GetPackageDescription(PChar(ModFileName));
&&& ContainsNode := Items.AddChild(ModNode, 'Contains');
&&& RequiresNode := Items.Addchild(ModNode, 'Requires');
&&& if ModDesc && EmptyStr then
&&&&& NodeHolder := TNodeHolder.C
&&&&&&& NodeHolder.ContainsNode := ContainsN
&&&&&&& NodeHolder.RequiresNode := RequiresN
&&&&&&& GetPackageInfo(HInstance, NodeHolder, Flags, PackageInfoProc);
&&&&& finally
&&&&&&& NodeHolder.F
&&&&& Items.AddChild(ModNode, ModDesc);
&&&&& if Flags and pfDesignOnly = pfDesignOnly then
&&&&&&& Items.AddChild(ModNode, 'Design-time package');
&&&&& if Flags and pfRunOnly = pfRunOnly then
&&&&&&& Items.AddChild (ModNode, 'Run-time package');
& Result := T
procedure TForm1.Button1Click(Sender: TObject);
& EnumModules(EnumModuleProc, nil);
EnumModules()EnumModuls()EnumModuleProc()TTreeViewTTreeViewGetPackDescription()GetPackageInfo()PackageInfoProc()
PackageInfoProc()FlaqsNameType()TTreeViewTpackageInfoProc
Delphi/VCL
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:127441次
积分:1807
积分:1807
排名:第10124名
原创:26篇
转载:132篇
评论:29条
(1)(1)(1)(7)(4)(1)(1)(2)(1)(1)(2)(4)(6)(58)(10)(47)(9)(1)(1)vcl60.bpl和rtl60.bpl下载 - 下载频道
- CSDN.NET
&&&&vcl60.bpl和rtl60.bpl下载
vcl60.bpl和rtl60.bpl下载
用Builder C++编写的程序如果没有设置好动态链接的话,拿到没有装Builder C++的电脑运行经常出现找不文件vcl60.bpl和rtl60.bpl,笔者重装电脑后就出现过此问题,现在将其打包上传上来。望对大家有所帮助。
若举报审核通过,可奖励20下载分
被举报人:
举报的资源分:
请选择类型
资源无法下载
资源无法使用
标题与实际内容不符
含有危害国家安全内容
含有反动色情等内容
含广告内容
版权问题,侵犯个人或公司的版权
*详细原因:
您可能还需要
开发技术下载排行您的位置: >>
>> VCL60.bpl(C++ Builder6) 下载 (#44506)
VCL60.bpl(C++ Builder6)
&&&&为什么用c++builder的做一个exe文件在别的机子上总说少vcl60.bpl等文件;这里有vcl60.bpl下载
复制到windows/system32文件夹中即可
VCL60.bpl(C++ Builder6)
下载地址列表
注意事项:
1.PC软件园欢迎您在本站下载VCL60.bpl(C++ Builder6),若需要注册,请您先注册再使用,支持正版,本软件版权归原作者所有,在使用的过程中有任何问题请于《VCL60.bpl(C++ Builder6)》官方联系,谢谢您的支持。
2.如果出现该页无法显示,请多试几次;如果总是不能下载,请点击,以便我们能够及时修正,更好的服务大家。
3.请一定升级到较新版的[]以便正常解压本站提供的软件;如有其它站务问题,欢迎发信.
4.由于网站服务器承受能力有限,请其他兄弟网站不要直接链接我们提供的软件,谢谢!
5.下载后请自行查毒!软件太多,站长不可能都查过,只保证原样提供,请自己小心!
6.站内提供的所有软件包含绿化补丁及软件注册码均是由网上搜集或作者(官方)提供发布,仅供交流、学习或测试!不得用于传播和盈利,商业用途,请您购买正版软件,若侵犯了你的版权利益,敬请来信.
装机必备软件
本类下载爬行
总下载爬行

我要回帖

更多关于 usernetschedule.exe 的文章

 

随机推荐