Check out the help under function declaration to see what stack 
alignment do you need,
and who take care of function arguments after it's executed.
Maybe declaring function with stdcall or cdecl might help, depend what 
do you want.
   
    function Name:integer; stdcall;

Anothre tip:
I'm warmly recomend to avoid using objects in argument lists, use simple 
types and
structures instead, such as PChars instead of strings for the sake of 
further maintance.


louis wrote:

>Hi there
>
>I've got a StringList which I create in an application and then pass
>this as a var parameter in an exported function to a DLL. But when I try
>to use the StringList in the DLL, I get an access violation.
>
>So here's the call to the exported function:
>
>  ErrList := TStringList.Create;
>  try
>    URI := GenerateReport(ADOConnection, rfPDF,
>      ParamList, ErrList, 'logo.jpg');
>
>And in the DLL:
>
>function GenerateReport(ADOConnection: TADOConnection; Format:
>TReportFormat;
>      ParamList: TStringList; var ErrList: TStringList; BitMapFileName:
>String; const bCopy: Boolean = false): String;
>
>Begin
>........
>........
>........
>
>ErrList.Append('whatever'); // Access violation here
>
>End;
>
>The Stringlist is only passed as a var parameter. I'm not trying to
>create it again, but still I get the access violation. Can anyone shed
>some light on the subject?
>
>Cheers
>Louis
>
>
>
>-----------------------------------------------------
>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