Using Dll created with Delphi in Excel
- From: "hasu" <hkaivos@xxxxxxxxx>
- Date: Sat, 15 Mar 2008 02:06:00 +0200
Hi all,
Delphi's Dll:
library ProjektiList;
type
....
function GetProjectText(Nro:Integer):String;
function GetProjectText(Nro:Integer):String;
begin
...
Showmessage(IntToStr(Nro));
result:='Hello?!'
end;
Excel macro:
Private Declare Function GetProjectText Lib "ProjektiList.dll" _
(ByVal nProNro As Integer) As String
Private Const nProNro = 7223
Public Function GetProjectName() As String
ActiveCell.Value = GetProjectText(nProNro )
End Function
It does not work! Showmessage shows something totally different than 7223.
And after excel crashes...
Program versions; Delphi = 2006, Excel = 2007
Does anyone has simple enough example even for me to understand?
-Hasu
.
- Follow-Ups:
- Re: Using Dll created with Delphi in Excel
- From: Jamie
- Re: Using Dll created with Delphi in Excel
- Prev by Date: Re: Dynamic arrays of record/object
- Next by Date: Re: Delphi is evil
- Previous by thread: Dynamic arrays of record/object
- Next by thread: Re: Using Dll created with Delphi in Excel
- Index(es):