 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Annie McEnery Guest
|
Posted: Tue Nov 11, 2003 11:43 am Post subject: using wininet only |
|
|
I want to send an encrypted string to our server via HTTP and get its
response string using only wininet functions. I am stuck on HTTPSendRequest,
although I am not sure I have all the correct parameters for InternetOpen,
InternetConnect and InternetOpenRequest. I have non null handles for all
these and Zero Errors from GetLastError, but get Error 12007 (unresolved
server name) after call to HTTPSendRequest.
Can anyone help me with the parameters?
Annie
|
|
| Back to top |
|
 |
anil kumar Guest
|
Posted: Mon Nov 24, 2003 6:25 am Post subject: Re: using wininet only |
|
|
Hi,
Here i am sending DELPHI code which uses WinInet functions to get html
data.
var
hInternetRoot,hOpenUrlHandle : HINTERNET;
dwSize : DWORD;
//dwSize : PExtended;
lpszData : LPSTR;
BigSize : DWORD;
lstr : String;
ltemp : Array of char;
begin
BigSize := 45000;
SetLength(ltemp,BigSize+1);
lpszData := PChar(String(ltemp));
hInternetRoot := InternetOpen('MyApp',INTERNET_OPEN_TYPE_DIRECT
,'','',0);
hOpenUrlHandle :=
InternetOpenUrl(hInternetRoot,PChar(edit1.text),'',0,INTERNET_FLAG_RAW_DATA,
0);
if ( InternetReadFile(hOpenUrlHandle,lpszData,BigSize,dwSize) ) then
begin
Showmessage('InternetReadFile() is successful');
lstr := lpszData;
Showmessage(lstr);
Memo1.Lines.Add(lstr);
end;
// Close the HINTERNET handle.
InternetCloseHandle(hOpenUrlHandle);
InternetCloseHandle(hInternetRoot);
Hope this will help you.
Regards
Anil
"Annie McEnery" <annie.mcenery (AT) nowcasting (DOT) ie> wrote
| Quote: | I want to send an encrypted string to our server via HTTP and get its
response string using only wininet functions. I am stuck on
HTTPSendRequest,
although I am not sure I have all the correct parameters for InternetOpen,
InternetConnect and InternetOpenRequest. I have non null handles for all
these and Zero Errors from GetLastError, but get Error 12007 (unresolved
server name) after call to HTTPSendRequest.
Can anyone help me with the parameters?
Annie
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|