Вот пример рабочего модуля на ядре Core8. рисует кнопку в правом верхнем углу с текстом - ТЕСТ
Код:
library Main;
{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }
uses
SysUtils,
Classes,
Direct3D8,
Forms,
Core8Classes in '../Core8Classes.pas';
{$R *.res}
function GetActState: string; stdcall; export;
const
STATE = 'MAIN';
begin
result := STATE;
end;
var
Button: TOSDButton;
function _Begin(Device: IDirect3DDevice8): HRESULT; stdcall; export;
begin
Button := TOSDButton.Create;
Button._Begin(Device, '..\DATA\INTERFACE\OSD\button.tga', '', 'Тест');
end;
function Draw: HRESULT; stdcall; export;
begin
Button.Rect := Rect(0, 0, 255, 40+55);
Button.X := Screen.Width-255;
Button.Y := 0;
Button.ScaleX := 1;
Button.ScaleY := 1;
Button.ActiveXLeft := Screen.Width-255;
Button.ActiveXRight := Screen.Width;
Button.ActiveYTop := 0;
Button.ActiveYBottom := 60;
Button.TextposX := 127;
Button.TextposY := 22;
Button.Draw;
end;
exports
GetActState,
_Begin,
Draw;
begin
end.