Questions tagged [pchar]

33 questions
-1
votes
1 answer

how can i return pchar type from delphi dll function?

Vb6 code to run on the following error. How can I fix the error? How can I return a normal string? vb6 code Private Declare Function DllPchar Lib "C:\TEST\Project2.dll" (ByVal AStr As String) As String Private Sub Command10_Click() Dim tmp…
-2
votes
2 answers

How do I write a Delphi procedure that modifies a string that works for both PCHAR and string?

To take an example, lets say I would like to write a simple procedure that deletes the 'X' characters from a string. How can I design my procedure so that it works for both string and PCHAR parameters. If I define it as: procedure RemoveX( source :…
-3
votes
1 answer

delphi call delphi dll memory leak caused by pchar

So lets take about dll. If you want to pass a string to a dll call, you must make the procedure input PChar. Else you get data curroption. so we say that our dll has procedure LookPchar(pfff:Pchar);stdCall;External 'OutDll.dll'; which is nice.…
none
  • 4,669
  • 14
  • 62
  • 102
1 2
3