BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

using wininet only

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Annie McEnery
Guest





PostPosted: Tue Nov 11, 2003 11:43 am    Post subject: using wininet only Reply with 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
anil kumar
Guest





PostPosted: Mon Nov 24, 2003 6:25 am    Post subject: Re: using wininet only Reply with quote




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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.