Hello,
I am a delphi coder so i have a question.
Can I make with Delphi Obj and can i shell it with MASM32.
If I make procedure and functions with Delphi OBJ.
Can I include this obj in masm32 and shellexecute this procedure in
the Delphi OBJ. I have written in Delphi???
I am a delphi coder so i have a question.
Can I make with Delphi Obj and can i shell it with MASM32.
If I make procedure and functions with Delphi OBJ.
Can I include this obj in masm32 and shellexecute this procedure in
the Delphi OBJ. I have written in Delphi???
I guess you wanted to ask if you can link the .obj file generated with delphi,
answer to this is NO. (I tried)
You can make a DLL and use the exported functions in both
ways... for this you might want to check out:
LoadLibrary
GetProcAddress
FreeLibrary
have fun
answer to this is NO. (I tried)
You can make a DLL and use the exported functions in both
ways... for this you might want to check out:
LoadLibrary
GetProcAddress
FreeLibrary
have fun
Hello,
Thanks for your thread.
If i have a ready Code and compile for EXE Files.
And I want to make a DLL.
That are the option (parameter) for the link32?
There are change the code too for DLL???
Thanks for your thread.
If i have a ready Code and compile for EXE Files.
And I want to make a DLL.
That are the option (parameter) for the link32?
There are change the code too for DLL???
Please download and install the masm package,
you will find an example in C:\masm32\EXAMPLE1\DLL
here is the delphi code needed to test this DLL (TSTDLL.DLL)
(I tested it on Delphi 7)
You will see it is quite easy.
you will find an example in C:\masm32\EXAMPLE1\DLL
here is the delphi code needed to test this DLL (TSTDLL.DLL)
(I tested it on Delphi 7)
program testmasmdll;
{$APPTYPE CONSOLE}
uses
SysUtils,Windows;
const
DLL_FULL_PATH = 'C:\masm32\EXAMPLE1\DLL\TSTDLL.DLL';
DLL_EXPORTED_FUNCTION = 'TestProc';
Var
DLL_HANDLE : Cardinal;
PROC_HANDLE : Procedure;
begin
Writeln('Loading ',DLL_EXPORTED_FUNCTION,' from ',DLL_FULL_PATH);
DLL_HANDLE := LoadLibrary(DLL_FULL_PATH); {Load DLL if not loaded, get addr}
PROC_HANDLE := GetProcAddress(DLL_HANDLE,DLL_EXPORTED_FUNCTION); {Load pointer to procedure}
Writeln('Executing..');
PROC_HANDLE; {Invoke/Call it here}
Writeln('Done!');
FreeLibrary(DLL_HANDLE); {oops, I forgot to free it :)}
end.
You will see it is quite easy.
One question for you:
Which one of these are you after..
1) Write a DLL in MASM and use it from Delphi
2) Write a DLL in Delphi and use it from MASM
?
Which one of these are you after..
1) Write a DLL in MASM and use it from Delphi
2) Write a DLL in Delphi and use it from MASM
?