Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C Compatible String

Status
Not open for further replies.

tamara3776

Programmer
Apr 6, 2004
18
US
Hi Everyone,
I am writing a dll for another piece of software that will only accept a C compatible string. The software will pass a string to my dll which then in turn will return a string. I have everything working fine accept that the software will not accept the string I return as it states it is not C compatible. Does anyone know of a way in delphi to return a C compatible string. I have read that AnsiString will do the trick but I have never used it. Can someone please let me know.

Thanks
 
Try returning pChar from you dll. Just change type of return value and cast your string to pChar on return.

HTH

---McMerfy
 
Thanks I will give it a try and let you know how it works out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top