I would love to see that
Pascal is not that hard to learn, I am not sure if you are familiar with it or not, if you are then apologies for this. If not, quick crash course:
variables: Generally same names as C, lpstr is "string", long is "int64".
Variable assignments:
If data is being moved:
if data is not being moved (eg and if statement)
Replace all {s / }s from C with begin / end:
eg:
if a=b then
begin
functionone;
functiontwo;
end;
if you DON't include the begin / end, then the first line after the statement is run only:
ie:
for i:=0 to 5 do
functionthree(5);
dostuff
is the same as
for i:=0 to 5 do
begin
functionthree(5);
end;
Procedures are defined like so:
procedure(parameter: int; nextparam: string):cdecl
begin
end;
(cdecl is essential as I recently found out)
Functions are like so:
function(param:int;paramtwo:int):int:cdecl
begin
Result := 1+2
end;
You specify the libs to use via the uses clause at the top of the unit
eg:
uses
SysUtils,Classes,Windows,Forms,Dialogs
exports for a DLL are like this (at end of code):
exports
functiona,
functionb,
functionc;
Each unit (like a .cpp file, only ending in .pas) must end with
"end."
Basic structures:
if a=b then
dosomething
for i:= 1 to 3 do
dosomething
try
...
finally
...
To help you going, I have included the source code to my menus DLL, it is pretty short but it took a while to research.
The only problem is that I have not been able to figure out how to get resource strings working properly. So I create/test the dll using the LOAD DLL / CALL DLL functions, then I use a tool called PE Explorer (written in Delphi) to delete all other resource strings and add my own.