Я создал Dynami c Dll, и я использовал метод этой DLL в моем Delphi Приложении. Я получаю эти ошибки, не могу понять, в чем причина.
Я объявил метод следующим образом
TWithdrawMoney = function(currentBalance,withdrawBalance:double):double;stdcall;
и использовал его как
Handle := LoadLibrary('C:\Projects\WithdrawMoneyDLL.dll'); //Line 83
if (currentBalance > 0) and (strtofloat(money.Text) <= currentBalance) then
begin
if Handle <> 0 then //Line 96
begin
@withdrawMoney := GetProcAddress(Handle, 'withdrawMoney'); //line 98
currentBalance := withdrawMoney(currentBalance,strtofloat(money.Text));
end;
ShowMessage('Widraw successful');
end
эти ошибки, которые я получаю.
[dcc32 Error] widrawMoneyPanel.pas(83): E2129 Cannot assign to a read-only property
[dcc32 Error] widrawMoneyPanel.pas(96): E2015 Operator not applicable to this operand type
[dcc32 Error] widrawMoneyPanel.pas(98): E2250 There is no overloaded version of 'GetProcAddress' that can be called with these arguments
[dcc32 Fatal Error] F2063 Could not compile used unit 'widrawMoneyPanel.pas'