I can help you, what Delphi version you have?
Setting up a delphi Dll is quite simple.
Use new-other-dll wizard and the IDE will create a new dll project.
The Dll structure is simple, it starts with "library" instead of "program".
In Uses you put whatever delphi library you are going to need. In the code below I included forms and dialogs, but they are not used in this particular sample. I kept them there as my skeleton.
Then you have the functions where you must declare all as CDECL for Darkbasic to be able to use them. Am assuming you know how to call them from DBPro.
The final part is EXPORTS, where you actually declare which functions can be dinamically linked from a program, either DBpro or any other.
You can call from a delphi dll another system dlls, the ones that are part of windows SDK or any other. The nice thing about delphi is that they did the work of declaring many functions and adapted the data types from the winSDK, so you can call the delphi libraries and only have to concern about the internal delphi name of the windows functions.
This particular dll was built with D2007 and you won't find the dwmapi library in Delphi 7, because it is related to windows vista.
The functions included can get the horizontal and vertical screen size, can detect if the pc is using windows vista and can disable or enable AERO. It is a fully working code that I use to disable screen composition in Windows Vista.
Hope it helps you start up.
JD
library Jdforcetools;
uses
SysUtils,
windows,dwmAPI,
Classes,dialogs,forms;
function JDScreenH: double;cdecl;
begin
result := screen.Height;
end;
function JDScreenW: double; cdecl;
begin
result := screen.Width;
end;
function JDProcMessages: double; cdecl;
begin
application.ProcessMessages ;
result := 0;
end;
function JDDisableAero: double; cdecl;
begin
// deshabilitar aero
result := DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);
end;
function JDEnableAero: double; cdecl;
begin
// habilitar aero
result := DwmEnableComposition(DWM_EC_ENABLECOMPOSITION);
end;
function JDIsWindowsVista: double;cdecl; // for my specific purpose the result needs to be double, not boolean
var
VerInfo: TOSVersioninfo;
tempstring : string;
begin
VerInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
GetVersionEx(VerInfo);
if VerInfo.dwMajorVersion >= 6
then result := 1
else result := 0; //zero is false, one is true
end;
{$R *.res}
exports JDScreenW,JDScreenH,
JDProcMessages,JDEnableAero,JDDisableAero,JDIsWindowsVista;
begin
end.
May the 3d force B with U