c++builder编译pas单元还是有很多问题

lynu 2001-09-22 08:29:42
以前常碰到,一般作一些修改可以了.
前段编译一个csdn下来的MSACM.PAS,ACMOUT.PAS,发现控件安装成功,但使用时提示错误.经检查,还是编译生成的头文件问题,生成的头文件与源文件不一样的,漏掉了很多类型声明.手动修改是可以的,但实在太麻烦了,有谁有现成的.
...全文
84 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
dycdyc123 2001-09-22
  • 打赏
  • 举报
回复
我也碰到过!!


我换了方法!!!(不用它)!◎~◎))
关键字: 内存泄漏 checkMem.pas 摘要:   这是一篇介绍如何使用CheckMem.pas单元检查delphi应用程序内存泄漏的文章 作者:999roseto347(fdaf at 163 dot com) 版本:V1.0 创建日期:2004-06-11 目录: 一、使用步骤 二、报告解读 三、测试例子 四、内存泄漏测试及修复的技巧 附:CheckMem.pas单元 一、使用步骤: A)、将CheckMem.pas单元加入到工程中 B)、修改工程文件,将'CheckMem.pas'放到uses下的第一句 program Project1; uses CheckMem in 'CheckMem.pas', Forms, Unit1 in 'Unit1.pas' {Form1} ;//其他单元文件 {$R *.RES} begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end. C)、正常的编译、运行应用程序 D)、退出应用程序后,将在应用程序目录下生成报告(如果有漏洞的话,如果没有则不生成)。 二、报告解读: 报告的内容: ===== Project1.exe,2004-6-11 15:36:55 ===== 可用地址空间 : 1024 KB(1048576 Byte) 未提交部分 : 1008 KB(1032192 Byte) 已提交部分 : 16 KB(16384 Byte) 空闲部分 : 13 KB(14020 Byte) 已分配部分 : 1 KB(2024 Byte) 全部小空闲内存块 : 0 KB(232 Byte) 全部大空闲内存块 : 11 KB(11864 Byte) 其它未用内存块 : 1 KB(1924 Byte) 内存管理器消耗 : 0 KB(340 Byte) 地址空间载入 : 0% 当前出现 3 处内存漏洞 : 0) 0000000000F33798 - 19($0013)字节 - 不是对象 1) 0000000000F337A8 - 18($0012)字节 - 不是对象 2) 0000000000F337B8 - 18($0012)字节 - 不是对象 解读如下: 当前出现 3 处内存漏洞 :(有三个内存块分配了,但未释放。注意这里不是指对象变量或指针变量的地址,是对象的内存区域或指针指向的内存地址) 序号 未释放内存的地址  内存大小    是否是对象?如果是列出对象的Name及class并指出对象实现的单元文件名 0) 0000000000F33798 - 19($0013)字节 - 不是对象 三、测试例子: 测试用的代码: unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } aa:TstringList; bb:tbutton; end; var Form1: TForm1; def:pointer; implementation {$R *.DFM} procedure TForm1.Button1Click(Sender: TObject); begin aa:=TstringList.Create; bb:=Tbutton.Create(nil); aa.Add('abcdefdafasdfasdfasdfasdf'); application.MessageBox(pchar(aa.Strings[0]),'asdf',MB_OK); // aa.Free; end; procedure TForm1.Button2Click(Sender: TObject); var p:Pointer; begin GetMem(def,10); p:=def; fillchar(p,10,$65); application.MessageBox (def,'aaa',MB_OK); // freemem(def,10); end; end. 我们先点击button1,然后退出。出现的报告如下: 当前出现 10 处内存漏洞 : 0) 0000000000F3109C - 67($0043)字节 - 不是对象 1) 0000000000F316A4 - 39($0027)字节 - 不是对象 2) 0000000000F33798 - 55($0037)字节 - (未命名): TStringList (48 字节) - In Classes.pas 3) 0000000000F337CC - 518($0206)字节 - : TButton (512 字节) - In StdCtrls.pas 4) 0000000000F339D0 - 42($002A)字节 - MS Sans Serif : TFont (36 字节) - In Graphics.pas 5) 0000000000F339F8 - 38($0026)字节 - (未命名): TSizeConstraints (32 字节) - In Controls.pas 6) 0000000000F33A1C - 30($001E)字节 - (未命名): TBrush (24 字节) - In Graphics.pas 7) 0000000000F33A38 - 38($0026)字节 - 不是对象 8) 0000000000F33A5C - 38($0026)字节 - 不是对象 9) 0000000000F33A80 - 42($002A)字节 - 不是对象 把bb:=Tbutton.Create(nil);注释掉://bb:=Tbutton.Create(nil);再重新编译,然后运行,再点button1。出现的报告如下: 当前出现 3 处内存漏洞 : 0) 0000000000F33798 - 55($0037)字节 - (未命名): TStringList (48 字节) - In Classes.pas 1) 0000000000F337CC - 38($0026)字节 - 不是对象 2) 0000000000F337F0 - 42($002A)字节 - 不是对象 说明了:一个对象未释放,将引起多处内存泄漏(因为一个对象可能包含多个子对象) OK,我们再来测试button2(注意,这次我们不点击button1,只点击button2 一次),产生的报告如下: 当前出现 1 处内存漏洞 : 0) 0000000000F33798 - 19($0013)字节 - 不是对象 再来一次,这次点击button2 三次: 当前出现 3 处内存漏洞 : 0) 0000000000F33798 - 19($0013)字节 - 不是对象 1) 0000000000F337A8 - 18($0012)字节 - 不是对象 2) 0000000000F337B8 - 18($0012)字节 - 不是对象 这说明:对于每一个未释放的内存,CheckMem都将记录下来!再注意上面的未释放内存的地址是紧挨着的,因此如果看到这样的报告,可以猜想为一变量,多次分配,但未释放! 四、内存泄漏测试及修复的技巧:(翻译自MemProof帮助的部分内容,翻译得不好,请大家来信指导) The following are a couple of tips that can be usefull when fixing leaks in an application : 下面的这些技巧对于修复应用程序的内存泄漏非常有用: * First just launch the app and then close it. If even this action generates leaks, fix those leaks first. Only after the main leaks are fixed, you should go into specific functionality areas of the application. *首先,运行应用程序然后马上退出。如果这样操作也产生内存泄漏,先修复这些漏洞。只有先修复这些主要的泄漏,你才能进行特定功能的测试。 * In your Delphi/C++Builder project options, remove as much forms as possible from the Auto-Create option. Create your forms dynamically. *在你的delphi/C++Builder工程选项中,尽可能地不要使用自动创建窗体,你需要时再动态创建。 * 注意在循环中创建或分配的内存的代码。如果它们未释放,可能引起大量的内存泄漏。 * Go for the biggest classes first - if you see a TMyFom leaking, try to fix this one first instead of going after a tiny TFont class. Since a Form will usually contain a lot of other classes, with one shot you will have fixed a lot of contained leaks. *先修复大的类,比如你看到TMyFom 类有泄漏,先解决它的问题,然后再解决像TFont 这样的小类。一个form类经常包含多个子类。修复一个form的未释放问题,你将解决大量该form包含的子对象未释的问题。 * Go for the easy fixes first. Some leaks fixes are very easy and obvious - if you fix the easy ones first, you will keep them out of your way. *首先修复容易修复的漏洞。一些泄漏是非常容易被发现的,如果你先修复他们,你就不用老想着他们了。 附:CheckMem.pas单元 unit CheckMem; file://Add it to the first line of project uses interface procedure SnapCurrMemStatToFile(Filename: string); implementation uses Windows, SysUtils, TypInfo; const MaxCount = High(Word); var OldMemMgr: TMemoryManager; ObjList: array[0..MaxCount] of Pointer; FreeInList: Integer = 0; GetMemCount: Integer = 0; FreeMemCount: Integer = 0; ReallocMemCount: Integer = 0; procedure AddToList(P: Pointer); begin if FreeInList > High(ObjList) then begin MessageBox(0, '内存管理监视器指针列表溢出,请增大列表项数!', '内存管理监视器', mb_ok); Exit; end; ObjList[FreeInList] := P; Inc(FreeInList); end; procedure RemoveFromList(P: Pointer); var I: Integer; begin for I := 0 to FreeInList - 1 do if ObjList[I] = P then begin Dec(FreeInList); Move(ObjList[I + 1], ObjList[I], (FreeInList - I) * SizeOf(Pointer)); Exit; end; end; procedure SnapCurrMemStatToFile(Filename: string); const FIELD_WIDTH = 20; var OutFile: TextFile; I, CurrFree, BlockSize: Integer; HeapStatus: THeapStatus; Item: TObject; ptd: PTypeData; ppi: PPropInfo; procedure Output(Text: string; Value: integer); begin Writeln(OutFile, Text: FIELD_WIDTH, Value div 1024, ' KB(', Value, ' Byte)'); end; begin AssignFile(OutFile, Filename); try if FileExists(Filename) then begin Append(OutFile); Writeln(OutFile); end else Rewrite(OutFile); CurrFree := FreeInList; HeapStatus := GetHeapStatus; { 局部堆状态 } with HeapStatus do begin Writeln(OutFile, '===== ', ExtractFileName(ParamStr(0)), ',', DateTimeToStr(Now), ' ====='); Writeln(OutFile); Output('可用地址空间 : ', TotalAddrSpace); Output('未提交部分 : ', TotalUncommitted); Output('已提交部分 : ', TotalCommitted); Output('空闲部分 : ', TotalFree); Output('已分配部分 : ', TotalAllocated); Output('全部小空闲内存块 : ', FreeSmall); Output('全部大空闲内存块 : ', FreeBig); Output('其它未用内存块 : ', Unused); Output('内存管理器消耗 : ', Overhead); Writeln(OutFile, '地址空间载入 : ': FIELD_WIDTH, TotalAllocated div (TotalAddrSpace div 100), '%'); end; Writeln(OutFile); Writeln(OutFile, Format('当前出现 %d 处内存漏洞 :', [GetMemCount - FreeMemCount])); for I := 0 to CurrFree - 1 do begin Write(OutFile, I: 4, ') ', IntToHex(Cardinal(ObjList[I]), 16), ' - '); BlockSize := PDWORD(DWORD(ObjList[I]) - 4)^; Write(OutFile, BlockSize: 4, '($' + IntToHex(BlockSize, 4) + ')字节', ' - '); try Item := TObject(ObjList[I]); if PTypeInfo(Item.ClassInfo).Kind <> tkClass then { type info technique } write(OutFile, '不是对象') else begin ptd := GetTypeData(PTypeInfo(Item.ClassInfo)); ppi := GetPropInfo(PTypeInfo(Item.ClassInfo), 'Name'); { 如果是TComponent } if ppi <> nil then begin write(OutFile, GetStrProp(Item, ppi)); write(OutFile, ' : '); end else write(OutFile, '(未命名): '); Write(OutFile, Item.ClassName, ' (', ptd.ClassType.InstanceSize, ' 字节) - In ', ptd.UnitName, '.pas'); end except on Exception do write(OutFile, '不是对象'); end; writeln(OutFile); end; finally CloseFile(OutFile); end; end; function NewGetMem(Size: Integer): Pointer; begin Inc(GetMemCount); Result := OldMemMgr.GetMem(Size); AddToList(Result); end; function NewFreeMem(P: Pointer): Integer; begin Inc(FreeMemCount); Result := OldMemMgr.FreeMem(P); RemoveFromList(P); end; function NewReallocMem(P: Pointer; Size: Integer): Pointer; begin Inc(ReallocMemCount); Result := OldMemMgr.ReallocMem(P, Size); RemoveFromList(P); AddToList(Result); end; const NewMemMgr: TMemoryManager = ( GetMem: NewGetMem; FreeMem: NewFreeMem; ReallocMem: NewReallocMem); initialization GetMemoryManager(OldMemMgr); SetMemoryManager(NewMemMgr); finalization SetMemoryManager(OldMemMgr); if (GetMemCount - FreeMemCount) <> 0 then SnapCurrMemStatToFile(ExtractFileDir(ParamStr(0)) + '\CheckMemory.Log');
(*****************************************************)(* *)(* Advanced Encryption Standard (AES) *)(* Interface Unit v1.0 *)(* *)(* Readme.txt 自述文档 2004.12.03 *)(* *)(*****************************************************)(* 介绍 *)AES 是一种使用安全码进行信息加密的标准。它支持 128 位、192 位和 256 位长度的密匙。加密算法的实现在 ElAES.pas 单元中。本人将其加密方法封装在 AES.pas 单元中,只需要调用两个标准函数就可以完成字符串的加密和解密。(* 文件列表 *)..Source AES 单元文件..Example 演示程序(* 适用平台 *)这份 Delphi 的执行基于 FIPS 草案标准,并且 AES 原作者已经通过了以下平台的测试: Delphi 4 Delphi 5 C++ Builder 5 Kylix 1本人又重新进行了补充测试,并顺利通过了以下平台: Delphi 6 Delphi 7特别说明: 在 Delphi 3 标准版中进行测试时,因为缺少 Longword 数据类型和 Math.pas 文件,并且不支持 overload 指示字,所以不能正常编译。(* 演示程序 *)这个示例程序演示了如何使用 AES 模块进行字符串的加密和解密过程。(* 使用方法 *)在程序中引用 AES 单元。调用 EncryptString 和 DecryptString 进行字符串的加密和解密。详细参阅 Example 文件夹中的例子。 (* 许可协议 *)您可以随意拷贝、使用和发部这个程序,但是必须保证程序的完整性,包括作者信息、版权信息和说明文档。请勿修改作者和版权信息。 这个程序基于 Mozilla Public License Version 1.1 许可,如果您使用了这个程序,那么就意味着您同意了许可协议中的所有内容。您可以在以下站点获取一个许可协议的副本。 http://www.mozilla.org/MPL/许可协议的发布基于 "AS IS" 基础,详细请阅读该许可协议。Alexander Ionov 是 AES 算法的最初作者,保留所有权利。(* 作者信息 *)ElAES 作者:EldoS, Alexander IonovAES Interface Unit 作者:杨泽晖 (Jorlen Young)您可以通过以下方式与我取得联系。WebSite: http://jorlen.51.net/ http://mycampus.03.com.cn/ http://mycampus.1155.net/ http://mycampus.ecoo.net/ http://mycampus.5500.org/Email: stanley_xfx@163.com
EhLib 9.1.024 源码版本,自行编译 EhLib 9.1 Build 9.1.024 Professional Edition. ---------------------------------------------- The Library contains components and classes for Borland Delphi versions 7, 9, Developer Studio 2006, Delphi 2007, Embarcadero RAD Studio 2009-XE10.2, Lazarus. TABLE OF CONTENTS ----------------- Overview Installation Library Installation Help Demonstration Programs Registering and Prices Other information About author Where to start. ------------------- Start overview of the library with the main Demo project .\Demos\Bin\MainDemo.Exe. (Compiled Demo files are available in the Evaluation version of the library) If you've used previous versions of the library, then you can read a summary of the new features and changes in the file history-eng.html. More detail about new features in this version of the library can be found in the file - About EhLib 9.1 Eng.doc To install a new version of the library in the IDE, use the installation program .\Installer\EhLibInstaller.exe If, at the installation have any problems, write a letter to ehlib support address support@ehlib.com You can also install the files in the library IDE manually, as described in Section 2. Installation Library After installation, make sure the operability of all installed components. To do this, open the IDE, compile and launch a major demonstration project .\Demos\MainDemo\Project1_XE2.dpr Read next file for full instructions of working with the library components: .\Hlp\ENG\"EhLib - Users guide.doc" Read about EhLib for Lazarus in the file - Lazarus<*>\readme.txt Overview -------- The Library contains several components and objects. TDBGridEh component TDBGridEh provides all functionality of TDBGrid and adds several new features as follows: Allows to select records, columns and rectangle areas. Special titles that can correspond to several/all columns. Footer that is able to show sum/count/other field values. Automatic column resizing to set grid width equal client width. Ability to change row and title height. Allows automatic broken of a single line long title and data row to a multiline. Title can act as button and, optionally show a sort marker. Automatically sortmarking. Ability to truncate long text with ellipsis. Lookup list can show several fields. Incremental search in lookup fields. Frozen columns. DateTime picker support for TDateField and TDateTimeField. Allows to show bitmaps from TImageList depending on field value. Allows to hide and track horizontal or vertical scrollbars. Allows to hide columns. Allows to show 3D frame for frozen, footer and data rows. Allows to draw memo fields. Multiline inplace editor. Proportional scrolling independently of sequenced of dataset. Automatically show checkboxes for Boolean fields. Allows to show checkboxes for other type of fields. Has a procedures to save and restore layout (visible columns, columns order, columns width, sortmarkers, row height) in/from registry or ini file. Allows to show hint (ToolTips) for text that don't fit in the cell. Allows to export data to Text, Csv, HTML, RTF, XLS and internal formats. Allows to import data from Text and internal formats. Can sort data in various dataset's. Can filter data in various dataset's. When DBGridEh is connected to DataSet of TMemTable type it allows: To view all data without moving active record. To display a tree-type structure of TMemTable records. To form list of values in dropdown list of SubTitle filter automatically. To create grouping records basing on the selected coulmns. TDBVertGridEh component Component to show one record from dataset in Vertical Orientation. Have a special column to show Field Captions Can customize inplace editor and data of the cell like in DBGridEh. TDBLookupComboboxEh component Provides all functionality of TDBLookupCombobox and adds several new features as follows: Can have flat style. Allows assign values as to KeyValue property just and to display Text property. Allows to type (assign) values to Text property not contained in data list (Style = csDropDownEh). Allows to hold KeyValue and Text as not affecting to each other values. Take effect when KeyField, ListField, ListSource, DataField and DataSource properties is empty. Drop down list can: Show titles, Have sizing grip, Automaticaly set width as sum of DisplayWidth of the list fields (Width = -1), Automaticaly drops on user pressed the key. Edit button can: Show DropDown, Ellipsis or Bitmap image. Have specified width. Have additional events: OnKeyValueChanged, OnButtonClick. TDBSumList component This component is intended for totaling sums and amounts of records in a TDataSet with dynamic changes. Component keeps a list of TDBSum objects, which contains types of group operations (goSum or goCount) and name sum field (goCount name of field is unnecessary). TPrintDBGridEh component TPrintDBGridEh provides properties and routines for preview and print of TDBGridEh component with several features: Ability to expand rows vertically until all text is printed. Ability to scale grid to fit it to page width. Ability to print/preview title for grid. Ability to print/preview page header and page footer where you can specify macros for current page, current date, current time and/or static text. Automatically print/preview multiselected area of TDBGridEh if it area is not empty. Ability to print/preview rich text before and after grid. TPreviewBox component TPreviewBox lets you create a customizable runtime preview. TPrinterPreview object TPrinterPreview lets you to record printable data in buffer for following output them on screen and to printer. TPrinterPreview have all functions and properties as in TPrinter object. You can use TPrinterPreview object similarly of TPrinter except some details. In TPrinter Printer.Canvas.Handle and Printer.Handle is the same but in TPrinterPreview PrinterPreview.Canvas.Handle represent the metafile in that is recored the data and PrinterPreview.Handle represent Printer.Handle. That is mean that you have to use PrinterPreview.Canvas.Handle for draw operation (DrawText, DrawTexteEx, e.t.c.) and use PrinterPreview.Handle in functions that return information about printer facilities (GetDeviceCaps, e.t.c.). Global function PrinterPreview returns default PrinterPreview object and shows data in default preview form. TDBEditEh component represents a single or multi-line edit control that can display and edit a field in a dataset or can works as non data-aware edit control. TDBDateTimeEditEh component represents a single-line date or time edit control that can display and edit a datetime field in a dataset or can works as non data-aware edit control. TDBComboBoxEh component represents a single or multi-line edit control that combines an edit box with a scrollable list and can display and edit a field in a dataset or can works as non data-aware combo edit control. TDBNumberEditEh component represents a single-line number edit control that can display and edit a numeric field in a dataset or can works as non data-aware edit control. TPropStorageEh, TIniPropStorageManEh, TRegPropStorageManEh components Components realize technology to store component properties to/from settings storage such as ini files, registry etc. TMemTableEh component dataset, which hold data in memory. Its possible consider as an array of records. Besides, it: Supports a special interface, which allows DBGridEh component to view all data without moving active record. Allows fetch data from TDataDriverEh object (DataDriver property). Allows unload change back in DataDriver, operative or postponed (in dependencies of the CachedUpdates property). Allows to create a master/detail relations on the client (filtering record) or on the external source (updating parameters [Params] and requiring data from DataDriver). Allows once-only (without the dynamic support) sort data, including Calculated and Lookup field. Allows create and fill data in design-time and save data in dfm file of the Form. Allows keep record in the manner of trees. Each record can have record elements-branches and itself be an element to other parental record. Component TDBGridEh supports to show the tree-type structure of these records. Allows to connect to the internal array of other TMemTableEh (via ExternalMemData property) and work with its data: sort, filter, edit. Has interface for requesting list of all unique values in one column of records array, ignoring local filter of the DataSet. TDBGridEh uses this property for automatic filling a list in DropDownBox of the subtitle filter cell. TDataDriverEh component carry out two tasks: Delivers data to TMemTableEh. Processes changed records of TMemTableEh (writes them in other dataset, or call events for processing the changes in program). TSQLDataDriverEh DataDriver that have four objects of the TSQLCommandEh type: SelectCommand, DeleteCommand, InsertCommand, UpdateCommand, GetrecCommand. TSQLDataDriverEh can not transfer queries to the server but it call global (for application) event which it is necessary to write to execute SQL expressions on the server. TBDEDataDriverEh, TIBXDataDriverEh, TDBXDataDriverEh and TADODataDriverEh Components. These are SQLDataDrivers that can deliver queries to the server using corresponding drivers of the access to datas. -------------------- 2. Installation Library -------------------- -------------------- 2.1 Installing library automatically -------------------- Run EhLibInstaller.exe program from "Installer" folder to install EhLib in Delphi/C++ Builder IDE. The program creates folders to keep EhLib binary and other requared files, copies requared files to created folders, compiles packages, register packages in IDE and write requared paths in registry. If you have executable installation program (for example, EhLibSetupD7Eval.exe) then you only need to run program and follow installation process. Setup automatically writes all units in necessary directory, installs packages and help files in IDE. -------------------- 2.2 Installing library manually ------------------- Follow next instructions to install files from EhLib archive: -- 2.2.1. For RAD Studio XE2 (Delphi) or higher: --------------------------------------------------------------------- Uninstall previous or evaluation version of EhLib (Old version) from Delphi IDE. Remove or copy to other directory files of old version to prevent crossing old and new version of EhLib (Including EhLib.bpl, EhLib.dcp or EhLibXX.bpl, EhLibXX.dcp, EhLibDataDriversXX, DclEhLibDataDriversXX files). These files can be located in the following folders on your computer C:\Users\All Users\Documents\RAD Studio\1X.0 C:\Users\All Users\Documents\Embarcadero\Studio\XX.0\Bpl C:\Users\All Users\Documents\Embarcadero\Studio\XX.0\Dcp Create new folder where source code and binary files will be kept (For example, C:\RAD_Studio_XE2\Components\EhLib). Hereinafter this folder will be call as "EhLib folder". Create new subfolder "Lib" in the "EhLib folder". Copy files from folders "Common", "RADStudioXE2" and "LangResources\Res" of EhLib archive into the folder "[EhLib folder]\Lib" as that all files were in one folder - "Lib". Default language resource of the library is English. If you want to change it to the other language do the next steps: - Select one of language file EhLibLangConsts.XXX.dfm - Copy this file to EhLibLangConsts.dfm file (with replacment of existing file) - In the first line of a new EhLibLangConsts.dfm file delete _XXX suffix in the name of object like this: object TEhLibLanguageConsts_ENU -> object TEhLibLanguageConsts Run RAD Studio IDE and Open EhLibProjGroup160.groupproj file from [EhLib folder]\Lib. Compile all packages of Prject Group. Install DclEhLibXX.Dpk and DclEhLibDataDriversXX.Dpk packages in IDE (Use Project/Install menu). Consistently compile packages EhLibXX.Dpk and EhLibDataDriversXX.Dpk in next modes: Win32\Debug Win64\Release Win64\Debug After compilation there should be created subfolders a Win32\Release, Win32\Debug, Win64\Release, Win64\Debug in the "[EhLib folder]\Lib" folder. Copy the *. dfm and *. res files from the "[Folder EhLib]\Lib" folder into the each of the next folders: Win32\Release, Win32\Debug, Win64\Release, Win64\Debug In the RAD Studio IDE add next paths: "[EhLib folder]\Lib\Win32\Release" path in the "Library path" for the Win32 platform. "[EhLib folder]\Lib\Win32\Debug" path in the "Debug dcu" for the Win32 platform. "[EhLib folder]\Lib\" path in the "Brasing path" for the Win32 platform. "[EhLib folder]\Lib\Win64\Release" path in the "Library path" for the Win64 platform. "[EhLib folder]\Lib\Win64\Debug" path in the "Debug dcu" for the Win64 platform. "[EhLib folder]\Lib\" path in the "Brasing path" for the Win64 platform. -- Copy DEMOS folder from the Archive EhLib to the "[EhLib Folder]". Open and compile any demo project for test. 2.2.2. Delphi 5.x - 7.x, Delphi 9.X Win32, BDS2006 Win32, Delphi2007, CodeGear RAD Studio 2009: ------------------------------------------------------------------------------- Uninstall previous or evaluation version of EhLib (Old version) from Delphi IDE. Remove or copy to other directory files of old version to prevent crossing old and new version of EhLib (Including EhLib.bpl, EhLib.dcp or EhLibXX.bpl, EhLibXX.dcp, EhLibDataDriversXX, DclEhLibDataDriversXX files). Create directory from which you will install EhLib library ('EhLib directory') (for example, C:\Delphi[X]\EhLib). Copy files from "Common", "Delphi[X]" | "BDS2006" and "LangResources\Res.Ansi" folders of the EhLib archive to 'EhLib directory'. Default language resource of the library is English. If you want to change it to the other language do the next steps: - Select one of language file EhLibLangConsts.XXX.dfm - Copy this file to EhLibLangConsts.dfm file (with replacment of existing file) - In the first line of a new EhLibLangConsts.dfm file delete _XXX suffix in the name of object like this: object TEhLibLanguageConsts_ENU -> object TEhLibLanguageConsts By default Delphi (5, 6 and 7) places compiled files to the \Projects\Bpl directory and this directory already present in the search PATH. But if you overwrite default BPL directory then you need put compiled EhLibXX.BPL file into directory that is accessible through the search PATH (i.e. DOS "PATH" environment variable; for example, in the Windows\System directory). Add, (if needed) 'EhLib directory' in Tools->Environment Options->Library-> Library Path (For Delphi 9 in Tools->Options->Environment Options-> Delphi Options->Library - Win32->Library Path). Use "File\Open..." menu item of Delphi IDE to open the runtime package - EhLibXX.Dpk. In "Package..." window click "Compile" button to compile the package. After that open and compile EhLibDataDriversXX.Dpk. After compiling run-time packages install design-time packages DclEhLibXX.BPL and DclEhLibDataDriversXX.BPL into the IDE. For that use "File\Open..." menu item to open design-time package DclEhLibXX.Dpk. In "Package..." window click "Compile" button to compile the package and then click "Install" button to register EhLib components on the component palette. Open and install DclEhLibDataDriversXX.Dpk package. EhLib components have to appear on 'EhLib' page of components palette. 2.2.4. Delphi 9.X Vcl.Net, , BDS2006 Vcl.Net: ---------------------------------------- Uninstall previous or evaluation version of EhLib (Old version) from Delphi IDE. Remove or copy to other directory files of old version to prevent crossing old and new version of EhLib (Including Vcl.EhLib90.dll, Vcl.DclEhLib90.dll, Vcl.EhLibDataDrivers90.dll, Vcl.DclEhLibDataDrivers90.dll files). Create directory from which you will install EhLib library ('EhLib directory') (for example, C:\BDS\3.0\EhLibVclNet). Copy files from Common and Delphi9 directories of the EhLib archive to 'EhLib directory'. In Delphi IDE: Add, (if needed) 'EhLib directory' in Component->Installed .NET Components ...-> Assembly Search Paths. Add, (if needed) 'EhLib directory' in Tools->Options->Environment Options-> Delphi Options->Library - NET->Library Path. Use "File\Open..." menu item of Delphi IDE to open the runtime package - Vcl.EhLibXX.Dpk. In "Project Manager..." window, click right button above 'Vcl.EhLibXX.Dll' and select "Build" menu to compile package. After that, open and compile Vcl.EhLibDataDriversXX.Dpk, Vcl.DclEhLibXX.Dpk and Vcl.DclEhLibDataDriversXX.Dpk. Open menu "Component->Installed .NET Components ..."->.NET VCL Components. Press 'Add...' button. Locate 'Vcl.DclEhLibXX.dll' and press 'Open'. (By default, this file have to be located in 'EhLib directory' directory) Press 'Ok' in 'Installed .NET Components' Dialog. 4. Documentation and Help ------------------------- 4.1. This version of library doesn't have embedded help files for Delphi8 or Higher. But the online help is available on the ehlib home page - http://www.ehlib.com/online-help 4.2. Delphi 7.x: Copy the EhLib.hlp and EhLib.cnt files to the Delphi HELP subdirectory. Select Help|Customize to start the OpenHelp application. Add the EhLib.cnt file to the Contents page, add the EhLib.hlp file to the Index and Link pages. 5. Demonstration Programs and Projects -------------------------------------- Demonstration programs use tables from the DEMOS directory and ADO Data Access. Read description of Demo projects in the file Demos\Info Eng.doc 6. Registering and Prices ------------------------- The EhLib is a Commercial product. If you find it useful and want to receive the latest versions please register your evaluation copy. You can read detailed information about prices on ehlib home prices page http://www.ehlib.com/buy You can read detailed information about registration at https://secure.shareit.com/shareit/product.html?productid=102489 After registration you will receive (e-mail only) address of registered version for downloading and password for unpacking. By registering the components you get the following advantages: 1. You will get new versions of the library free within a year from the date of registration. 2. You will get technical support for the library all the time. 3. You encourage EhLib Team to make the library even better. 7. Other information ----------------- (1) Information for user who already have old version of TDBGridEH or TDBSumList or EhLib installed: Before installation this version of EhLib uninstall previous version of TDBGridEh or TDBSumList or EhLib from IDE and remove or copy this files to other directory to prevent crossing of new and old files. (2) If at compile-time under C++ Builder you get next error: [Linker Error] Unresolved external 'AlphaBlend' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\PROJECTS\LIB\EHLIBB60.LIB|C:\VCL6\EhLib\Common\DBGridEh.pas then add msimg32.lib library in Linker options of your Project. It is placed at $(BCB)\lib\psdk\msimg32.lib 8. About Company ---------------- Contact as if you have any questions, comments or suggestions: EhLib Team

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧