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

C / C++ / MFC

 
GeneralRe: How to draw Arc in eVC++ (WinCE) Pin
himuskanhere22-Aug-07 0:21
himuskanhere22-Aug-07 0:21 
GeneralRe: How to draw Arc in eVC++ (WinCE) Pin
himuskanhere22-Aug-07 1:17
himuskanhere22-Aug-07 1:17 
AnswerRe: How to draw Arc in eVC++ (WinCE) Pin
Nelek22-Aug-07 1:26
protectorNelek22-Aug-07 1:26 
AnswerRe: How to draw Arc in eVC++ (WinCE) Pin
Iain Clarke, Warrior Programmer22-Aug-07 3:20
Iain Clarke, Warrior Programmer22-Aug-07 3:20 
QuestionSocket Programming. Pin
GauranG Shah21-Aug-07 23:00
GauranG Shah21-Aug-07 23:00 
AnswerRe: Socket Programming. Pin
ThatsAlok21-Aug-07 23:10
ThatsAlok21-Aug-07 23:10 
QuestionExecuting a script on a server asynchronously Pin
Sean OConnor21-Aug-07 22:58
Sean OConnor21-Aug-07 22:58 
AnswerRe: Executing a script on a server asynchronously [modified] Pin
Sean OConnor22-Aug-07 0:33
Sean OConnor22-Aug-07 0:33 
I think I've got it to work using this code but I'd be very grateful if anybody who knows their WinInet could take a look and let me know if I'm doing anything wrong (eg not freeing up things when I should be):

HINTERNET	hInternetSession;   
HINTERNET	hURL;

typedef struct
{
    HWND        hWindow;     // window handle
    int         nStatusList; // ID of the list box control to hold the callbacks
    HINTERNET   hResource;   // HINTERNET handle created by InternetOpenUrl
    char        szMemo[512]; // string to store status memo
} REQUEST_CONTEXT;

REQUEST_CONTEXT	request_context;

void __stdcall InternetCallbackFunction(HINTERNET hInternet,
                        DWORD dwContext,
                        DWORD dwInternetStatus,
                        LPVOID lpvStatusInformation,
                        DWORD dwStatusInformationLength)
{
	REQUEST_CONTEXT *cpContext;
	cpContext= (REQUEST_CONTEXT*)dwContext;

	switch (dwInternetStatus)
	{
		case INTERNET_STATUS_HANDLE_CREATED:
			hURL = hInternet;
			break;

		case INTERNET_STATUS_REQUEST_COMPLETE:
			InternetCloseHandle(hURL);

			InternetSetStatusCallback(hInternetSession, NULL);

			InternetCloseHandle(hInternetSession);
			break;
	}
}

BOOL SendURL(char* szURL)
{
	hInternetSession = InternetOpen("Microsoft Internet Explorer", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, INTERNET_FLAG_ASYNC);
	
	if (hInternetSession != NULL)
	{
		InternetSetStatusCallback(hInternetSession, (INTERNET_STATUS_CALLBACK)InternetCallbackFunction);

		hURL = InternetOpenUrl(hInternetSession, szURL, NULL, 0, INTERNET_FLAG_RELOAD | INTERNET_FLAG_PRAGMA_NOCACHE | INTERNET_FLAG_NO_CACHE_WRITE, (unsigned long)(&request_context));
	
		return TRUE;
	}
			
	return FALSE;
}



-- modified at 7:01 Wednesday 22nd August, 2007
QuestionChanging IE options from VC Pin
pc_dev21-Aug-07 22:55
pc_dev21-Aug-07 22:55 
AnswerRe: Changing IE options from VC Pin
ThatsAlok21-Aug-07 23:09
ThatsAlok21-Aug-07 23:09 
QuestionRe: Changing IE options from VC Pin
David Crow22-Aug-07 2:32
David Crow22-Aug-07 2:32 
AnswerRe: Changing IE options from VC Pin
ThatsAlok22-Aug-07 21:27
ThatsAlok22-Aug-07 21:27 
AnswerRe: Changing IE options from VC Pin
ThatsAlok22-Aug-07 21:27
ThatsAlok22-Aug-07 21:27 
AnswerRe: Changing IE options from VC Pin
ThatsAlok22-Aug-07 21:33
ThatsAlok22-Aug-07 21:33 
QuestionHow to read partial scanline for tiff image? Pin
vandana721-Aug-07 22:51
vandana721-Aug-07 22:51 
QuestionSending a WM_ message to another PC Pin
Mike Winter21-Aug-07 22:25
Mike Winter21-Aug-07 22:25 
AnswerRe: Sending a WM_ message to another PC Pin
ThatsAlok21-Aug-07 22:34
ThatsAlok21-Aug-07 22:34 
QuestionHow to record voice from Avaya IP phone Pin
Rajeche21-Aug-07 21:35
Rajeche21-Aug-07 21:35 
QuestionGeographical information Pin
Sunil P V21-Aug-07 21:04
Sunil P V21-Aug-07 21:04 
AnswerRe: Geographical information Pin
toxcct21-Aug-07 21:07
toxcct21-Aug-07 21:07 
GeneralRe: Geographical information Pin
Sunil P V21-Aug-07 21:14
Sunil P V21-Aug-07 21:14 
GeneralRe: Geographical information Pin
toxcct21-Aug-07 21:21
toxcct21-Aug-07 21:21 
GeneralRe: Geographical information Pin
Sunil P V21-Aug-07 23:00
Sunil P V21-Aug-07 23:00 
GeneralRe: Geographical information Pin
ThatsAlok21-Aug-07 22:34
ThatsAlok21-Aug-07 22:34 
QuestionDecrypt WIFI Pass Key Pin
Arun krishnan21-Aug-07 21:00
Arun krishnan21-Aug-07 21:00 

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.