Board index » delphi » LPSTR Conversion for DLL call ??????

LPSTR Conversion for DLL call ??????

I am trying to write a routine to use a DLL using a LPSTR (Long Pointer to
string) variable parameter.

This has been a long frustrating process, as nothing seems to wrok.  Does
anyone out there know what I should be declaring in the Delphi program, and
passing to the DLL ???

Thanks in advance for any help.  Please respond by email to:

j.scofi...@mms.net

JIm Scofield

 

Re:LPSTR Conversion for DLL call ??????


Quote
Jim Scofield wrote:

> I am trying to write a routine to use a DLL using a LPSTR (Long Pointer to
> string) variable parameter.

In D1, simply pass a PChar to the API function that needs an LPSTR. In
D2, you can simply cast a string as a PChar and pass that in (although
strictly speaking this is an LPCSTR, but it should work ...)

Thanks, cheers,
+-----------------------------+------------------------------------+
| Adrian Cable [Doom Master!] | Internet: [MeGALiTH on IRC]        |
| Fidonet: 2:252/169.3        | aca...@sv.span.com                 |
+-----------------------------+------------------------------------+
| Latest ViRC '96 release: 0.60                                    |
| Get it from: http://apollo3.com/~acable/virc.html                |
+------------------------------------------------------------------+

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3i

mQBNAzICpWsAAAECAKELh2Zi1a+jD1Nj7VYloLg+uVimsRZHv5DgfCDOOo0nnXNq
KE19vjB1ZD4Rs1NTP8cQEjsnTwrHajgcZK8ecUkABRG0IUFkcmlhbiBDYWJsZSA8
YWNhYmxlQHN2LnNwYW4uY29tPokAVQMFEDICpWtqOBxkrx5xSQEBYjkB/jEcpWFp
y4t6XKL/zj34hfyCZYJKXQpuJlMWklywhu5OC2Z6WlsKeS6deKTyrW0GWw9hw6gS
qPdw+TcN9PSQBbE=
=6ioa
-----END PGP PUBLIC KEY BLOCK-----

Other Threads