update to 0.7.0

This commit is contained in:
Razor12911
2023-04-29 22:51:51 +02:00
parent 552a733296
commit 50c7c248da
144 changed files with 42115 additions and 22130 deletions

View File

@@ -0,0 +1,47 @@
object fAppMain: TfAppMain
Left = 0
Top = 0
Caption = 'FastMM Sharing Test Application'
ClientHeight = 208
ClientWidth = 300
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 8
Top = 172
Width = 281
Height = 25
Caption = 'Load DLL and Display DLL Form'
TabOrder = 0
OnClick = Button1Click
end
object Memo1: TMemo
Left = 8
Top = 8
Width = 281
Height = 157
Enabled = False
Lines.Strings = (
'This application shows how to share FastMM between '
'an application and dynamically loaded DLL, without '
'using the borlndmm.dll library.'
''
'Click the button to load the test DLL and display its '
'form.'
''
'The relevant settings for this application:'
'1) FastMM4.pas is the first unit in the uses clause '
'2) The "ShareMM" option is enabled'
'3) "Use Runtime Packages" is disabled'
'')
TabOrder = 1
end
end

View File

@@ -0,0 +1,51 @@
unit ApplicationForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TfAppMain = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fAppMain: TfAppMain;
implementation
{$R *.dfm}
procedure TfAppMain.Button1Click(Sender: TObject);
var
LDLLHandle: HModule;
LShowProc: TProcedure;
begin
LDLLHandle := LoadLibrary('TestDLL.dll');
if LDLLHandle <> 0 then
begin
try
LShowProc := GetProcAddress(LDLLHandle, 'ShowDLLForm');
if Assigned(LShowProc) then
begin
LShowProc;
end
else
ShowMessage('The ShowDLLForm procedure could not be found in the DLL.');
finally
FreeLibrary(LDLLHandle);
end;
end
else
ShowMessage('The DLL was not found. Please compile the DLL before running this application.');
end;
end.

View File

@@ -0,0 +1,54 @@
object fDLLMain: TfDLLMain
Left = 0
Top = 0
Caption = 'FastMM Sharing DLL Form'
ClientHeight = 185
ClientWidth = 337
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 8
Top = 152
Width = 165
Height = 25
Caption = 'Click to leak some memory'
TabOrder = 0
OnClick = Button1Click
end
object Memo1: TMemo
Left = 8
Top = 8
Width = 317
Height = 137
Enabled = False
Lines.Strings = (
'This DLL is sharing the memory manager of the main '
'application. '
''
'The following settings were used to achieve this:'
'1) FastMM4.pas is the first unit in the "uses" clause of the .dp' +
'r'
'2) The "ShareMM" option is enabled.'
'3) The "AttemptToUseSharedMM" option is enabled.'
''
'Click the button to leak some memory.')
TabOrder = 1
end
object Button2: TButton
Left = 180
Top = 152
Width = 145
Height = 25
Caption = 'Unload DLL'
TabOrder = 2
OnClick = Button2Click
end
end

View File

@@ -0,0 +1,39 @@
unit DLLForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TfDLLMain = class(TForm)
Button1: TButton;
Memo1: TMemo;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fDLLMain: TfDLLMain;
implementation
{$R *.dfm}
procedure TfDLLMain.Button1Click(Sender: TObject);
begin
TObject.Create;
end;
procedure TfDLLMain.Button2Click(Sender: TObject);
begin
Close;
end;
end.

View File

@@ -0,0 +1,44 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{39e9f19f-728b-49d7-8ea1-18ef0776485d}</ProjectGuid>
</PropertyGroup>
<ItemGroup />
<ItemGroup>
<Projects Include="TestApplication.dproj" />
<Projects Include="TestDLL.dproj" />
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Default.Personality</Borland.Personality>
<Borland.ProjectType />
<BorlandProject>
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<Target Name="TestApplication">
<MSBuild Projects="TestApplication.dproj" Targets="" />
</Target>
<Target Name="TestApplication:Clean">
<MSBuild Projects="TestApplication.dproj" Targets="Clean" />
</Target>
<Target Name="TestApplication:Make">
<MSBuild Projects="TestApplication.dproj" Targets="Make" />
</Target>
<Target Name="TestDLL">
<MSBuild Projects="TestDLL.dproj" Targets="" />
</Target>
<Target Name="TestDLL:Clean">
<MSBuild Projects="TestDLL.dproj" Targets="Clean" />
</Target>
<Target Name="TestDLL:Make">
<MSBuild Projects="TestDLL.dproj" Targets="Make" />
</Target>
<Target Name="Build">
<CallTarget Targets="TestApplication;TestDLL" />
</Target>
<Target Name="Clean">
<CallTarget Targets="TestApplication:Clean;TestDLL:Clean" />
</Target>
<Target Name="Make">
<CallTarget Targets="TestApplication:Make;TestDLL:Make" />
</Target>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project>

View File

@@ -0,0 +1,14 @@
program TestApplication;
uses
FastMM4,
Forms,
ApplicationForm in 'ApplicationForm.pas' {fAppMain};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TfAppMain, fAppMain);
Application.Run;
end.

View File

@@ -0,0 +1,71 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{ddb60ef2-54ec-4031-ade8-28222d2e51e3}</ProjectGuid>
<MainSource>TestApplication.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>TestApplication.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>ShareMM;RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>ShareMM;DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType />
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">7177</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">TestApplication.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="TestApplication.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="ApplicationForm.pas">
<Form>fAppMain</Form>
</DCCReference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,26 @@
library TestDLL;
uses
FastMM4,
SysUtils,
Classes,
DLLForm in 'DLLForm.pas' {fDLLMain};
{$R *.res}
procedure ShowDLLForm;
begin
with TfDLLMain.Create(nil) do
begin
try
ShowModal;
finally
Free;
end;
end;
end;
exports ShowDllForm;
begin
end.

View File

@@ -0,0 +1,71 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{dc5ee909-443c-42e3-aed6-5b0de135122e}</ProjectGuid>
<MainSource>TestDLL.dpr</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>TestDLL.dll</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>ShareMM;AttemptToUseSharedMM;RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_Define>ShareMM;AttemptToUseSharedMM;DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType />
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">7177</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">TestDLL.dpr</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="TestDLL.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="DLLForm.pas">
<Form>fDLLMain</Form>
</DCCReference>
</ItemGroup>
</Project>