take a look at the code below.
..
procedure statusProc(msgid,  value : integer);
begin
...
end;
...

var
  lpStatusProc : Pointer;
begin
  lpStatusProc := @statusProc;
  // your call
  initialize(PAnsiChar('somepath', PAnsiChar('some filename'),
lpStatusProc);




                                                                           
           "Kinan Qassar"                                                  
           <[EMAIL PROTECTED]>                                                 
           Sent by:                                                     To 
           [EMAIL PROTECTED]        <[email protected]>          
           ps.com                                                       cc 
                                                                           
                                                                   Subject 
           07.07.2005 13:40           RE: [delphi-en] How can I call DLL   
                                      proc                                 
                                                                           
            Please respond to                                              
           [EMAIL PROTECTED]                                             
                 ps.com                                                    
                                                                           
                                                                           




Hi,



lpStatusProc should be pointer of procedure



how can I do it.

procedure statusProc(msgid,  value : integer);





  _____

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




for C++ declaration
   int initialize (LPSTR logfilepath, LPSTR logfilename, LPARAM
lpStatusProc);

in Pascal declare this funcion as shown here:
   function initialize(logfilepath: LPSTR; logfilename: LPSTR;
lpStatusProc: LPARAM): integer; cdecl;

be sure to have windows.pas in your uses clause, or use PAnsiChar instead
LPSTR and LongInt instead LPARAM.

Cheers!






           "Kinan Qassar"
           <[EMAIL PROTECTED]>
           Sent by:                                                     To
           [EMAIL PROTECTED]        <[email protected]>
           ps.com                                                       cc

                                                                   Subject
           07.07.2005 12:21           [delphi-en] How can I call DLL proc


            Please respond to
           [EMAIL PROTECTED]
                 ps.com






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











-----------------------------------------------------
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