Wed, 18 Jun 1902 08:00:00 GMT
PChar SOMEONE PLEASE HELP ME !!
QuoteGary wrote: > Hello, > Someone please help me ! I've been messing around with the winsock > stuff you can do in Turbo Pascal Windows, but I have come to a hault, > it seems that the only send data I can use is of PChar form, does > anyone know how I can make a string into PChar ? Please help I really > am stuck. If its not possible to make string >> pchar is there some > other way of inputting data to the computer and making it into Pchar ?
uses Strings; var s : string; sz : array[0..256] of char; s:='.......whatever'; StrPCopy(sz,s); The above uses the extended syntax by which the compiler treats PChar and a zero-based character array as (mostly) equivalent. This is often easier to program. Alternatively: uses Strings; var s : string; b : PChar; s:='.......whatever'; GetMem(b,length(s)+1); StrPCopy(b,s); Quote> Please reply to me at hum...@dial.pipex.com as I don't regulary check > USENET.
If you post questions and expect replies then you jolly well ought to check the newsgroup. Quote> Thanks very much. > Gary
|