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

C / C++ / MFC

 
AnswerRe: Boolean statments Pin
toxcct9-Oct-06 0:11
toxcct9-Oct-06 0:11 
AnswerRe: Boolean statments Pin
Hamid_RT9-Oct-06 1:23
Hamid_RT9-Oct-06 1:23 
GeneralRe: Boolean statments [modified] Pin
kakan9-Oct-06 1:48
professionalkakan9-Oct-06 1:48 
GeneralRe: Boolean statments Pin
Hamid_RT9-Oct-06 2:18
Hamid_RT9-Oct-06 2:18 
GeneralRe: Boolean statments Pin
kakan9-Oct-06 2:23
professionalkakan9-Oct-06 2:23 
GeneralRe: Boolean statments Pin
Zac Howland9-Oct-06 5:16
Zac Howland9-Oct-06 5:16 
AnswerRe: Boolean statments Pin
David Crow9-Oct-06 4:12
David Crow9-Oct-06 4:12 
QuestionNot understanding or WININET function not working properly ?!! Pin
Benlahrech .Dj8-Oct-06 23:46
Benlahrech .Dj8-Oct-06 23:46 
Hi,

I tried to use InternetSetOption() function to change or set options on IE some many times (a win32 function which is included in wininet C++ library)
and when i use any internet dial up i see the same settings like connection
time out, authotification..
This is my new function to call in WINMAIN entry point:

#include "stdafx.h"
#include "wininet.h"
...

//InternetConnectionOptions() function definition

BOOL InternetConnectionOptions()
{
INTERNET_PER_CONN_OPTION_LIST list;
BOOL bReturn;
DWORD dwBufSize = sizeof(list);

// fill out list struct
list.dwSize = sizeof(list);
// NULL == LAN, otherwise connectoid name
list.pszConnection = NULL;
// set three options
list.dwOptionCount = 3;
list.pOptions = new INTERNET_PER_CONN_OPTION[3];
// make sure the memory was allocated
if(NULL == list.pOptions)
{
//return FALSE if the memory wasn't allocated
return FALSE;
}
// set flags
list.pOptions[0].dwOption = INTERNET_PER_CONN_FLAGS;
list.pOptions[0].Value.dwValue = PROXY_TYPE_DIRECT |PROXY_TYPE_PROXY;
// set proxy name
list.pOptions[1].dwOption = INTERNET_PER_CONN_PROXY_SERVER;
list.pOptions[1].Value.pszValue = "http://proxy:80";
// set proxy override
list.pOptions[2].dwOption = INTERNET_PER_CONN_PROXY_BYPASS;
list.pOptions[2].Value.pszValue = "local";
// set the options on the connection
bReturn = InternetSetOption(NULL,
INTERNET_OPTION_PER_CONNECTION_OPTION, &list, dwBufSize);
//free the allocated memory
delete [] list.pOptions;
bReturn = InternetSetOption(hOpen,INTERNET_OPTION_USERNAME,
lpszUser, strlen(lpszUser)+1);//Here is the main problem !!
return bReturn;
}
note : hOpen is the Handle returned by InternetConnect() function
... and to be more specific when i go to Internet Explorer->Tools then Internet Options i see the same settings the username didn't change

Last Question: Why we couldn't include the first parameter as NULL in authentication setting (When we put the first parameter in InternetSetOption we mean that we change the defaulte setting .. Right??) Smile | :)

could someone tell me why its not working? or just
tell me how to use it well
Thank you.



"Anyone who considers arithmetical methods of producing random numbers is, of course, in a state of sin."
John von Neumann

AnswerRe: Not understanding or WININET function not working properly ?!! Pin
Galatei9-Oct-06 1:44
Galatei9-Oct-06 1:44 
GeneralRe: Great thanks Pin
Benlahrech .Dj9-Oct-06 2:35
Benlahrech .Dj9-Oct-06 2:35 
GeneralRe: Great thanks Pin
Galatei9-Oct-06 3:36
Galatei9-Oct-06 3:36 
QuestionHow to copy data from a stream into a structure Pin
Dhilleswar8-Oct-06 23:34
Dhilleswar8-Oct-06 23:34 
AnswerRe: How to copy data from a stream into a structure Pin
toxcct8-Oct-06 23:44
toxcct8-Oct-06 23:44 
AnswerRe: How to copy data from a stream into a structure Pin
Galatei9-Oct-06 3:43
Galatei9-Oct-06 3:43 
QuestionParsing Dataset.GetXml() with xsl into html... Pin
reet1238-Oct-06 23:24
reet1238-Oct-06 23:24 
AnswerRe: Parsing Dataset.GetXml() with xsl into html... Pin
Hamid_RT19-Oct-06 7:54
Hamid_RT19-Oct-06 7:54 
GeneralRe: Parsing Dataset.GetXml() with xsl into html... Pin
reet12319-Oct-06 20:13
reet12319-Oct-06 20:13 
Questionsql query Pin
zizzzz8-Oct-06 22:53
zizzzz8-Oct-06 22:53 
AnswerRe: sql query Pin
zizzzz8-Oct-06 23:07
zizzzz8-Oct-06 23:07 
GeneralRe: sql query Pin
toxcct8-Oct-06 23:14
toxcct8-Oct-06 23:14 
GeneralRe: sql query Pin
zizzzz8-Oct-06 23:24
zizzzz8-Oct-06 23:24 
GeneralRe: sql query Pin
toxcct8-Oct-06 23:28
toxcct8-Oct-06 23:28 
GeneralRe: sql query Pin
Hamid_RT9-Oct-06 1:25
Hamid_RT9-Oct-06 1:25 
GeneralRe: sql query Pin
David Crow9-Oct-06 4:19
David Crow9-Oct-06 4:19 
GeneralRe: sql query Pin
Hamid_RT9-Oct-06 7:26
Hamid_RT9-Oct-06 7:26 

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.