Hi,
I want to retrieve a machine code from an external dll. This dll can be designed anyway i want, so there is no problem, but what is the best way to do this.
With Regards,
Jeroen van Onzen
PS: The double-click in the dialog editor (on a control) is not the most intuitive option. It was driving me crazy to find the option....
PS2: A help file under the Dialog Editor would also be nice.
retrieving a machine code
Its really up to you! The most complex (and powerful) way would be to build an InstallAware plug-in. This way your DLL has full access to the script variables, can paint its own line in the script, etc...but this is probably overkill for most uses.
The direct way is just to use the Call DLL Function call. It can pass an allocated string buffer (if your ID is textual) or an integer as a variable (if your ID is numeric), among others. So you can make your function prototype in your DLL any way you like and then use the Call DLL Function command to invoke it.
The direct way is just to use the Call DLL Function call. It can pass an allocated string buffer (if your ID is textual) or an integer as a variable (if your ID is numeric), among others. So you can make your function prototype in your DLL any way you like and then use the Call DLL Function command to invoke it.
-
- Posts: 25
- Joined: Wed Nov 23, 2005 10:21 am
-
- Posts: 25
- Joined: Wed Nov 23, 2005 10:21 am
I am trying to call a dll made in delphi with the following function:
Any idea why this fails?
Code: Select all
procedure GetMachineCode(out MachineCode: PChar); stdcall;
var sMachineCode: string;
begin
sMachineCode := Format('%x', [100000]);
MachineCode := StrAlloc(9);
StrPCopy(MachineCode, sMachineCode);
end
Any idea why this fails?
-
- Posts: 25
- Joined: Wed Nov 23, 2005 10:21 am
Code: Select all
~InstallAWARE Clipboard Data~
~Call DLL Function~
~{79CC353E-2FF2-4CC8-B8EA-754DE5707248}~
~$SUPPORTDIR$\\dwesetup.dll,GetMachineCode,void,,"pointer to string",$MACHINECODE$,$~
~mIDEFunc.dll\\mEXEFunc.dll~
-
- Posts: 25
- Joined: Wed Nov 23, 2005 10:21 am
Who is online
Users browsing this forum: No registered users and 134 guests