expertcad/SRC/Dll/SCSDB.dpr
2025-05-12 10:07:51 +03:00

48 lines
1.1 KiB
ObjectPascal

library SCSDB;
{ 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, Dialogs,
Classes, ActiveX;
function CreateGUID: PChar; stdcall;
var GUID: TGUID;
S: String;
begin
Result := '';
if CoCreateGuid(GUID) = s_OK then
Result := PChar(GUIDToString(GUID));
end;
function Test: Integer; stdcall;
begin
Result := 321;
ShowMessage('124');
end;
function TestStr: String; stdcall;
begin
Result := '321';
ShowMessage('124');
end;
exports
CreateGUID,
Test,
TestStr;
begin
end.