function GetString(MyStrchar;var Length:integer):integer;StdCall;Export;
Const
L=300;
var
i:integer;
begin
for i:= 0 to Ldo
MyStr:=chr(Random(70)+1);
MyStr[i+1]:=#0;
Length:=301;
Result:=0;
end;
当然了
参考:
int GetWindowText(
HWND hWnd, // handle to window or control with text
LPTSTR lpString, // address of buffer for text
int nMaxCount // maximum number of characters to copy
);
还有GetWindowsDirectory也都是这样的API。