I defined these

 

This is in C++

 int initialize (LPSTR logfilepath, LPSTR logfilename, LPARAM
lpStatusProc);



  Function initialize(logfilepath, logfilename: PAnsiChar;

  LpStatusProc: Pointer): integer; cdecl; external dllname name
'initialize';

 

  function statusProc(msgid,  value : LongInt): LongInt;

 

procedure TForm1.Button10Click(Sender: TObject);

var lsStaus : Pointer;

begin

  lsStaus := @statusproc;

  initialize(PAnsiChar(ExtractFilePath(Application.ExeName)),
PAnsiChar('sample.ini'), lsStaus);

end;

 

When I call initialize it goes to statusProc and after that Accesss
violation message appears

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Chris @ IT
Sent: Thursday, July 07, 2005 1:19 PM
To: [email protected]
Subject: Re: [delphi-en] How can I call DLL proc

 

which function in particular?

----- Original Message -----
From: "Kinan Qassar" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, July 07, 2005 3:21 PM
Subject: [delphi-en] How can I call DLL proc


> Hi,
>
>
>
> I have DLL and this function inside it and
>
>
>
> int initialize (LPSTR logfilepath, LPSTR logfilename, LPARAM
lpStatusProc);
>
>
>
> lpStatusProc
>
> void statusProc (int msgid, int value);
>
>
>
> How can I call it in Delphi?
>
>
>
> Please advice.
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [EMAIL PROTECTED]
> Yahoo! Groups Links
>
>
>
>
>
>
>



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 




  _____  

YAHOO! GROUPS LINKS 

 

*        Visit your group "delphi-en
<http://groups.yahoo.com/group/delphi-en> " on the web.
  
*        To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
  
*        Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/>  Terms of Service. 

 

  _____  



[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to