Click here to Skip to main content
15,915,319 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CDHTMLDialog Scroll ? Pin
algol14-Oct-03 21:27
algol14-Oct-03 21:27 
GeneralRe: CDHTMLDialog Scroll ? Pin
Matt Gates15-Oct-03 3:27
Matt Gates15-Oct-03 3:27 
Generalsetup files in visual c++ Pin
sarasara098765413-Oct-03 9:39
sarasara098765413-Oct-03 9:39 
QuestionHow can I open and read PS/2 Port (Read Mouse data) Pin
asd175313-Oct-03 9:25
asd175313-Oct-03 9:25 
QuestionHow can I open and read PS/2 Port (Read Mouse data) Pin
asd175313-Oct-03 9:25
asd175313-Oct-03 9:25 
GeneralHelp me Pin
Tomas Wilhelmsson13-Oct-03 9:20
Tomas Wilhelmsson13-Oct-03 9:20 
QuestionUpdateData into modeless dialog? Pin
andrzejf13-Oct-03 8:34
andrzejf13-Oct-03 8:34 
GeneralTrapping KeyBoard events Pin
act_x13-Oct-03 7:41
act_x13-Oct-03 7:41 
GeneralRe: Trapping KeyBoard events Pin
Phil Hamer13-Oct-03 10:55
Phil Hamer13-Oct-03 10:55 
GeneralHelp with WMI please Pin
corwin3213-Oct-03 7:19
corwin3213-Oct-03 7:19 
QuestionHow to close Modeless Dialog Pin
vancouver77713-Oct-03 6:57
vancouver77713-Oct-03 6:57 
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 

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.