PDA

View Full Version : Accessing strings behind pointers



jarjarv
11-04-2003, 05:24 AM
How do I set a string value behind a pointer to a string variable?


In my project I pass a string to a DLL function that alters the string. I need to set the value of the altered string to another string variable. I can't find a way to do this.

I am looking for something like this:
svSomeString = *psvPointerToString;

RichAquino
11-04-2003, 02:56 PM
Hi,

The indirection operator (*) only works for pointers to numbers.

You should just use code like this:

function MyFunc()
STRING svMyString, szMyOtherString;
begin
MyDLL.MyDLLFunc(&svMyString);
szMyOtherString = svMyString;
end;

Rich