Click here to Skip to main content
15,891,708 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: convert string to ascii in vc++ Pin
ThatsAlok18-Mar-05 0:50
ThatsAlok18-Mar-05 0:50 
GeneralRe: convert string to ascii in vc++ Pin
nehathoma18-Mar-05 0:55
nehathoma18-Mar-05 0:55 
GeneralRe: convert string to ascii in vc++ Pin
ThatsAlok18-Mar-05 1:05
ThatsAlok18-Mar-05 1:05 
GeneralRe: convert string to ascii in vc++ Pin
nehathoma18-Mar-05 1:10
nehathoma18-Mar-05 1:10 
GeneralRe: convert string to ascii in vc++ Pin
ThatsAlok18-Mar-05 2:22
ThatsAlok18-Mar-05 2:22 
GeneralRe: convert string to ascii in vc++ Pin
nehathoma18-Mar-05 16:56
nehathoma18-Mar-05 16:56 
QuestionPowerpoint Automation: VB a lot faster than C++ ?? Pin
User 172888417-Mar-05 22:53
User 172888417-Mar-05 22:53 
GeneralFindFirstUrlCacheEntry problem Pin
Spiritofamerica17-Mar-05 22:45
Spiritofamerica17-Mar-05 22:45 
hello

can someone please tell me what is wrong with this function I wrote:

<br />
<br />
BOOL scan(char *url2search4)<br />
<br />
{<br />
	MessageBox(0,url2search4,"a",MB_OK);<br />
<br />
	INTERNET_CACHE_ENTRY_INFO  icei;<br />
<br />
    HANDLE the_cache_handle;<br />
<br />
unsigned long buffer_size=10324;<br />
<br />
    the_cache_handle =FindFirstUrlCacheEntry(NULL/*search_pattern*/,&icei,&buffer_size);<br />
<br />
	if(the_cache_handle==NULL)<br />
	{<br />
		DisplayError(GetLastError());<br />
		return FALSE;<br />
	}<br />
<br />
	<br />
	while(FindNextUrlCacheEntry(the_cache_handle,&icei,&buffer_size))<br />
<br />
	{<br />
		MessageBox(0,icei.lpszSourceUrlName,"uite ce am gasit",MB_OK);<br />
		<br />
		if(strstr(icei.lpszSourceUrlName,url2search4)==0)<br />
		{<br />
			<br />
			MessageBox(0,"egal","equal",MB_OK);<br />
			return TRUE;<br />
		}<br />
<br />
	}<br />
	<br />
return FALSE;<br />
}<br />
<br />


everything builds ok and runs but I never get to actually find a url even thought when I go to

C:\Documents and Settings\[MyUserName].000\Local Settings\Temporary Internet Files

I can see it there

Similar functions from Wininet.h work, like DeleteUrlCacheEntry

No matter what I do the_cache_handle is always NULL and the GetLastError fucntion returns "this parrameter is incorect"

here is the Display Error Function also if you think this might help

<br />
<br />
void DisplayError(DWORD dwError ) <br />
{<br />
	<br />
	LPTSTR lpBuffer = NULL;<br />
<br />
    FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER |  FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwError,<br />
         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpBuffer, 0, NULL );<br />
	if(dwError!=0)   MessageBox(GetActiveWindow(), lpBuffer, "Error", MB_OK|MB_ICONERROR);<br />
	LocalFree( lpBuffer );<br />
<br />
<br />
}<br />

Please help

thank you in advance
GeneralRe: FindFirstUrlCacheEntry problem Pin
Michael Dunn18-Mar-05 8:22
sitebuilderMichael Dunn18-Mar-05 8:22 
GeneralRe: FindFirstUrlCacheEntry problem Pin
Mike Dimmick18-Mar-05 8:49
Mike Dimmick18-Mar-05 8:49 
GeneralRe: FindFirstUrlCacheEntry problem Pin
Spiritofamerica18-Mar-05 10:18
Spiritofamerica18-Mar-05 10:18 
GeneralRe: FindFirstUrlCacheEntry problem Pin
Spiritofamerica9-May-05 12:26
Spiritofamerica9-May-05 12:26 
Questionhow to post a custom message in mfc Pin
Anonymous17-Mar-05 22:41
Anonymous17-Mar-05 22:41 
AnswerRe: how to post a custom message in mfc Pin
bouli18-Mar-05 1:59
bouli18-Mar-05 1:59 
GeneralRe: how to post a custom message in mfc Pin
Ravi Bhavnani18-Mar-05 3:05
professionalRavi Bhavnani18-Mar-05 3:05 
GeneralRe: how to post a custom message in mfc Pin
John R. Shaw18-Mar-05 7:44
John R. Shaw18-Mar-05 7:44 
GeneralRe: how to post a custom message in mfc Pin
Blake Miller18-Mar-05 11:50
Blake Miller18-Mar-05 11:50 
QuestionHow to make a button invisible dynamically Pin
caykahve17-Mar-05 22:25
caykahve17-Mar-05 22:25 
AnswerRe: How to make a button invisible dynamically Pin
Mike Dimmick17-Mar-05 22:33
Mike Dimmick17-Mar-05 22:33 
GeneralRe: How to make a button invisible dynamically Pin
caykahve17-Mar-05 22:58
caykahve17-Mar-05 22:58 
GeneralRe: How to make a button invisible dynamically Pin
Cedric Moonen18-Mar-05 1:04
Cedric Moonen18-Mar-05 1:04 
GeneralRe: How to make a button invisible dynamically Pin
Blake Miller18-Mar-05 11:52
Blake Miller18-Mar-05 11:52 
General#define problem Pin
cmk17-Mar-05 22:19
cmk17-Mar-05 22:19 
GeneralRe: #define problem Pin
Bob Stanneveld18-Mar-05 0:39
Bob Stanneveld18-Mar-05 0:39 
GeneralRe: #define problem Pin
cmk18-Mar-05 11:57
cmk18-Mar-05 11:57 

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.