var
oXMLHTTP: OleVariant;
MemoryStream: TMemoryStream;
Stream: IStream;
OleStream: TOleStream;
begin
oXMLHTTP := CreateOleObject('MSXML2.XMLHTTP.3.0');
oXMLHTTP.open('GET', 'https://www.google.com/images/srpr/logo11w.png', False);
oXMLHTTP.send(EmptyParam);
Stream := IUnknown(oXMLHTTP.ResponseStream) as IStream;
OleStream := TOleStream.Create(Stream);
try
OleStream.Position := 0;
MemoryStream := TMemoryStream.Create;
try
MemoryStream.CopyFrom(OleStream, OleStream.Size);
MemoryStream.SaveToFile('logo11w.png');
finally
MemoryStream.Free;
end;
finally
OleStream.Free;
end;
'Academy I > Tech Academy' 카테고리의 다른 글
[Delphi]커뮤니티 에디션 (0) | 2019.06.27 |
---|---|
[Delphi]Skin Components (0) | 2019.06.19 |
[Delphi]크롬 브라우저를 특정 URL로 띄우기 (0) | 2019.05.16 |
[Delphi]Read and Write: ListView (0) | 2019.03.07 |
[Delphi]글자가 한글인지 확인 (0) | 2019.03.06 |
[Delphi]Pointer (0) | 2019.02.20 |
[Delphi]인터넷 연결 상태 확인 (0) | 2019.01.31 |
[Delphi]실제 웹페이지 주소연결을 체크하는 방법 (0) | 2019.01.31 |