Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create process & IE Pin
_Flaviu13-Feb-12 7:30
_Flaviu13-Feb-12 7:30 
GeneralRe: Create process & IE Pin
_Flaviu13-Feb-12 9:30
_Flaviu13-Feb-12 9:30 
QuestionRe: Create process & IE Pin
David Crow13-Feb-12 10:52
David Crow13-Feb-12 10:52 
AnswerRe: Create process & IE Pin
Chuck O'Toole13-Feb-12 13:29
Chuck O'Toole13-Feb-12 13:29 
GeneralRe: Create process & IE Pin
_Flaviu13-Feb-12 19:38
_Flaviu13-Feb-12 19:38 
GeneralRe: Create process & IE Pin
Jochen Arndt13-Feb-12 21:23
professionalJochen Arndt13-Feb-12 21:23 
AnswerRe: Create process & IE Pin
Chuck O'Toole13-Feb-12 23:49
Chuck O'Toole13-Feb-12 23:49 
GeneralRe: Create process & IE Pin
_Flaviu15-Feb-12 19:41
_Flaviu15-Feb-12 19:41 
I want to execute this address :
// http://www.somesite.com/index.php?page=projects&sub=der_download_port

Here is my trial:
C++
CString CTestWinInetDoc::SendRequest()
{
	HINTERNET hSession = InternetOpen(_T("TestWinInet"),
		INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0L);
	if(hSession == NULL)return _T("Internet session handle invalid");
	HINTERNET hConnect = InternetConnect(hSession,
		_T("http://www.somesite.com"),
		INTERNET_DEFAULT_HTTP_PORT,NULL,NULL,
		INTERNET_SERVICE_HTTP,0,0);
	if(hConnect == NULL)
	{
		InternetCloseHandle(hSession);
		return _T("Internet connect handle invalid");
	}
	HINTERNET hRequest = HttpOpenRequest(hConnect, NULL,
		_T("index.php?page=projects&sub=der_download_port"), NULL, NULL, 0, INTERNET_FLAG_RELOAD, 0);
	if(hRequest == NULL)
	{
		InternetCloseHandle(hSession);
		InternetCloseHandle(hConnect);
		return _T("Internet request handle invalid");
	}

	BOOL bSent = HttpSendRequest(hRequest, NULL, 0, 
		NULL, 0);
	if(! bSent)
	{
		InternetCloseHandle(hSession);
		InternetCloseHandle(hConnect);
		InternetCloseHandle(hRequest);
		return _T("Can not sent requested data");
	}

	InternetCloseHandle(hSession);
	InternetCloseHandle(hConnect);
	InternetCloseHandle(hRequest);

	return _T("Success !");
}


but this code seems to do nothing ... what is wrong here ?
AnswerRe: Create process & IE Pin
Chuck O'Toole16-Feb-12 4:35
Chuck O'Toole16-Feb-12 4:35 
QuestionTCP/IP socket timeout per connection Pin
vikramlinux13-Feb-12 4:17
vikramlinux13-Feb-12 4:17 
AnswerRe: TCP/IP socket timeout per connection Pin
Albert Holguin13-Feb-12 4:38
professionalAlbert Holguin13-Feb-12 4:38 
GeneralRe: TCP/IP socket timeout per connection Pin
vikramlinux13-Feb-12 4:44
vikramlinux13-Feb-12 4:44 
GeneralRe: TCP/IP socket timeout per connection Pin
Albert Holguin13-Feb-12 6:22
professionalAlbert Holguin13-Feb-12 6:22 
GeneralRe: TCP/IP socket timeout per connection Pin
vikramlinux13-Feb-12 22:27
vikramlinux13-Feb-12 22:27 
QuestionHow to re-use the replace() function to replace different strings in the same file ? Pin
Faez Shingeri13-Feb-12 0:12
Faez Shingeri13-Feb-12 0:12 
AnswerRe: How to re-use the replace() function to replace different strings in the same file ? Pin
Luc Pattyn13-Feb-12 2:36
sitebuilderLuc Pattyn13-Feb-12 2:36 
GeneralRe: How to re-use the replace() function to replace different strings in the same file ? Pin
David Crow13-Feb-12 2:43
David Crow13-Feb-12 2:43 
GeneralRe: How to re-use the replace() function to replace different strings in the same file ? Pin
Faez Shingeri13-Feb-12 18:33
Faez Shingeri13-Feb-12 18:33 
GeneralRe: How to re-use the replace() function to replace different strings in the same file ? Pin
David Crow14-Feb-12 3:13
David Crow14-Feb-12 3:13 
GeneralRe: How to re-use the replace() function to replace different strings in the same file ? Pin
Faez Shingeri14-Feb-12 16:58
Faez Shingeri14-Feb-12 16:58 
QuestionRe: How to re-use the replace() function to replace different strings in the same file ? Pin
David Crow15-Feb-12 3:01
David Crow15-Feb-12 3:01 
QuestionWrite a C/C++ program that connects to a MySQL server and displays the global TIMEZONE Pin
manmadkumarreddy12-Feb-12 7:50
manmadkumarreddy12-Feb-12 7:50 
AnswerRe: Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE Pin
Richard Andrew x6412-Feb-12 7:55
professionalRichard Andrew x6412-Feb-12 7:55 
AnswerRe: Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE Pin
Richard MacCutchan12-Feb-12 8:12
mveRichard MacCutchan12-Feb-12 8:12 
AnswerRe: Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE Pin
Mohibur Rashid12-Feb-12 18:04
professionalMohibur Rashid12-Feb-12 18:04 

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.