안녕하세요? 유승우 입니다.
제가 소스를 제대로 안봐서...
String -> PChar 로 바꾸는 것은..
우선 StrPCopy라는 함수를 이용하세요. 델파이 기본 함수임.
그리고 '류'님이 만드신 함수중에 Strg Unit의 StrToC라는 함수가 있습니다.
파스칼의 스트링 타입이 기존의 C와 달라서, 처음에 Null이 들어 갑니다.
같이 참고 하시고요...
HELP화일 밑에 써 넣어 드릴께요..
Unit
SysUtils
Category
String Handling Routines (null-terminated)
StrPCopy copies Pascal-style string to a null-terminated string.
function StrPCopy(Dest: PChar; const Source: string): PChar;
Description
The StrPCopy function copies a Pascal-style string Source into a null-terminated string Dest.
StrPCopy does not perform any length checking.
The destination buffer must have room for at least Length(Source)+1 characters.
Example
uses SysUtils;
var
A: array[0..79] of Char;
S: String;
begin
S := 'Honk if you know Blaise.';
StrPCopy(A, S);
Canvas.TextOut(10, 10, StrPas(A));
end;
그럼 이만. 도움이 될런지..?
|