Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DLL in Delphi6 problem

25 views
Skip to first unread message

Chris Keating (iAnywhere Solutions)

unread,
Jul 11, 2003, 1:35:30 PM7/11/03
to
I suspect that the Delphi PCHAR arguments should be PowerBuilder REF STRING.
You should also preallocate memory using SPACE( ) if the values are
populated in the DLL.

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8
iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

<m...@fcsedp.it> wrote in message news:eilutI9RDHA.191@forums-2-dub...
> Hi everybody!
>
> I have created a DLL in Delphi6 including the following functions:
>
> function OpenConn : longint; export; stdcall;
> function CloseConn : longint; export; stdcall;
> function Request (args : pchar) : longint; export; stdcall;
> function AddParam (sP, sV : pchar) : longint; export; stdcall;
> function ClrParam : longint; export; stdcall;
> procedure WSACloseAll; export; stdcall;
>
> "translated" in powerscript by
>
> FUNCTION LONG openconn () LIBRARY "wsa.dll";
> FUNCTION LONG closeconn () LIBRARY "wsa.dll";
> FUNCTION LONG request (string args) LIBRARY "wsa.dll";
> FUNCTION LONG addparam (string sP, string sV) LIBRARY "wsa.dll";
> FUNCTION LONG clrparam () LIBRARY "wsa.dll";
> SUBROUTINE WSACloseAll () LIBRARY "wsa.dll";
>
> When I call it from an application in Powerbuilder 6.5 it works perfectly
> well; but on closing the application, an access violation error comes off
> that does not occur if I don't use the DLL.
> Does anybody have any suggestion?
>
> Thanks.
>
> Bye.
>
> Marco Ferlini
> F.C.S. Solutions S.r.l.
> marco....@fcssolutions.it
>
>
>


m...@fcsedp.it

unread,
Jul 11, 2003, 1:22:31 PM7/11/03
to

Philip_Salgannik

unread,
Jul 23, 2003, 3:49:36 PM7/23/03
to
Can you elaborate on this and maybe offer some evidence. Your general
statement does not sound correct.

Paul B

unread,
Jul 23, 2003, 7:58:17 AM7/23/03
to
Did you use any thread class or maybe you created another thread in some
other way ?
If so - be sure if all the threads are closed - PB doesn't works properly
with threads :(

Użytkownik <m...@fcsedp.it> napisał w wiadomości
news:eilutI9RDHA.191@forums-2-dub...

0 new messages