Click here to Skip to main content
15,901,284 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to close Modeless Dialog Pin
vcplusplus13-Oct-03 7:32
vcplusplus13-Oct-03 7:32 
AnswerRe: How to close Modeless Dialog Pin
Jim Crafton13-Oct-03 7:50
Jim Crafton13-Oct-03 7:50 
Generalfile io Pin
Snyp13-Oct-03 6:55
Snyp13-Oct-03 6:55 
GeneralRe: file io Pin
David Crow13-Oct-03 7:57
David Crow13-Oct-03 7:57 
GeneralkeyBoard events Pin
act_x13-Oct-03 6:53
act_x13-Oct-03 6:53 
GeneralDisabling the tool bar button Pin
sanjay zore13-Oct-03 6:29
sanjay zore13-Oct-03 6:29 
GeneralRe: Disabling the tool bar button Pin
Mike Danberg13-Oct-03 8:26
Mike Danberg13-Oct-03 8:26 
GeneralDownload file from internet (http) Pin
Dominik Reichl13-Oct-03 6:26
Dominik Reichl13-Oct-03 6:26 
Hello,

I am trying to download files from the internet. Currently I use the Windows API functions InternetOpen, InternetOpenURL, InternetReadFile, etc.

HINTERNET hFile;
DWORD dwRead = 1;
BYTE pHttpBuffer[TR_BUFFER_SIZE];

hFile = InternetOpenUrl(m_hConnection, TR_URL, NULL, 0,
	INTERNET_FLAG_RELOAD, 0);
if(hFile == NULL) return false;

while(dwRead != 0)
{
	if(InternetReadFile(hFile, pHttpBuffer, TR_BUFFER_SIZE, &dwRead) == TRUE)
	{
		if(dwRead != 0)
		{
			_ParseBuffer((char *)pHttpBuffer, TR_BUFFER_SIZE);
		}
	}
	else dwRead = 0;
}

InternetCloseHandle(hFile);

The _ParseBuffer function does something with the buffer, it doesn't matter here.
When I start the program, it sends out some bytes (I see this with personal firewall monitor) and waits about 10 seconds for the answer. I don't know what I am doing wrong. It's not the internet server.

Do you know any other method than this for downloading files? I cannot use URLDownloadToFile, nor can I use MFC.

Thanks in advance
Dominik



_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? Wink | ;)
(doesn't work on NT)

GeneralRe: Download file from internet (http) Pin
David Isla13-Oct-03 7:01
David Isla13-Oct-03 7:01 
GeneralRe: Download file from internet (http) Pin
Dominik Reichl13-Oct-03 8:16
Dominik Reichl13-Oct-03 8:16 
GeneralInternet from a Windows Service Pin
Bart13-Oct-03 5:25
Bart13-Oct-03 5:25 
GeneralWS_CLIPCHILDREN problem Pin
jmgir13-Oct-03 5:21
jmgir13-Oct-03 5:21 
Generalwrapper to a function with an unknown number of variables Pin
sagmam13-Oct-03 5:06
sagmam13-Oct-03 5:06 
GeneralRe: wrapper to a function with an unknown number of variables Pin
Phil Hamer13-Oct-03 5:33
Phil Hamer13-Oct-03 5:33 
QuestionBeginner: How to declare pointers ? Pin
MirNixDirNix13-Oct-03 5:05
MirNixDirNix13-Oct-03 5:05 
AnswerRe: Beginner: How to declare pointers ? Pin
Phil Hamer13-Oct-03 5:21
Phil Hamer13-Oct-03 5:21 
GeneralCFileDialog + PropertySheet Pin
act_x13-Oct-03 5:00
act_x13-Oct-03 5:00 
GeneralProblem starting windows service from command line Pin
haritadala13-Oct-03 4:26
haritadala13-Oct-03 4:26 
GeneralCentering a CFormView into a main window Pin
wollet13-Oct-03 4:02
wollet13-Oct-03 4:02 
GeneralQuestion about taborder using win32 API Pin
Perry Bruins13-Oct-03 3:43
Perry Bruins13-Oct-03 3:43 
GeneralRe: Question about taborder using win32 API Pin
ELEFK13-Oct-03 4:14
sussELEFK13-Oct-03 4:14 
GeneralRe: Question about taborder using win32 API Pin
Michael Dunn13-Oct-03 4:32
sitebuilderMichael Dunn13-Oct-03 4:32 
QuestionHow to make .ACS(agent character storage) Pin
sunju13-Oct-03 2:43
sunju13-Oct-03 2:43 
GeneralCloseHandle Pin
jmkhael13-Oct-03 2:12
jmkhael13-Oct-03 2:12 
GeneralRe: CloseHandle Pin
Phil Hamer13-Oct-03 4:58
Phil Hamer13-Oct-03 4:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.