Вниз
Скачать: CL | DM;

c VB на Delphi   Найти похожие ветки 

← →
ilka ©   (2003-11-07 16:38) [0]

Подскажите как переделать с visual basic на delphi?

Dim MyXMLDocument
Dim MyHTTPCommunicator

rem Creating MSHTML objects
Set MyXMLDocument = CreateObject ("MSXML2.DOMDocument")
Set MyHTTPCommunicator = CreateObject ("Msxml2.XMLHTTP")

MyXMLDocument.load ("C:\file.xml")

rem connect to webpage
MyHTTPCommunicator.open "POST", " http://localhost/test.asp", false

rem send xml to the page
MyHTTPCommunicator.send MyXMLDocument

rem and display te response
wscript.echo MyHTTPCommunicator.responseText


← →
AngryMac ©   (2003-11-07 16:44) [1]

Ну как-то так:


var
MyXMLDocument, MyHTTPCommunicator: OleVariant;
begin
MyXMLDocument := CreateOLEObject ("MSXML2.DOMDocument");
MyHTTPCommunicator := CreateOLEObject ("Msxml2.XMLHTTP");
MyXMLDocument.load("C:\file.xml");
MyHTTPCommunicator.open("POST", " http://localhost/test.asp", False); // (может вместо False -> 0)
MyHTTPCommunicator.send(MyXMLDocument);
ShowMessage(MyHTTPCommunicator.responseText);
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.021 c
6-56800
Lomik
2003-09-20 22:47
2003.11.17
повторно не отсылает stream


1-56604
RoLeX
2003-11-06 00:02
2003.11.17
TOpenDialog, как сделать?


1-56608
P0tia
2003-11-04 11:49
2003.11.17
MainMenu


1-56650
FlankerX
2003-10-31 12:22
2003.11.17
ICQ Winamp3


11-56552
savva
2003-02-19 10:07
2003.11.17
Memo and Insert - работает или нет?




   Наверх