Hi fellows, I don't understand how to translate exactly this code to asm, can you help me out ?
The main problem is with the parameters of the Wininet API Function FindFirstUrlCacheEntry.
Here's what the Win(inet) Api says about this function:

lpszUrlSearchPattern Pointer to a string that contains the source name pattern to search for. This can be set to "cookie:" or "visited:" to enumerate the cookies and URL History entries in the cache. If this parameter is NULL, the function uses *.*.
lpFirstCacheEntryInfo Pointer to an INTERNET_CACHE_ENTRY_INFO structure.
lpdwFirstCacheEntryInfoBufferSize Pointer to an unsigned long integer variable that specifies the size of the lpFirstCacheEntryInfo buffer, in TCHARs. When the function returns, the variable contains the number of TCHARs copied to the buffer, or the required size, in bytes, needed to retrieve the cache entry.

Ok, what's exactly the third parameter ? How do I represent it in ASM ?

Here's the C code:


delete [] lpCacheEntry;
*** lpCacheEntry = (LPINTERNET_CACHE_ENTRY_INFO) new char; What is this ??
lpCacheEntry->dwStructSize = dwEntrySize;
FindFirstUrlCacheEntry(NULL, lpCacheEntry, &dwTrySize)

Ok, this code should return (I dunno exactly where) data about the IE Cache, now
Ok, I think this could be translated like this in ASM...


invoke RtlZeroMemory, ADDR lpCacheEntry, sizeof lpCacheEntry
mov eax, dwEntrySize
mov lpCacheEntry.swStructSize, eax
invoke FindFirstUrlCacheEntry, NULL, ADDR lpCacheEntry, ADDR dwTrySize

Can u explain me the line with *** ??? What is creating outta there ? A char with the LPINTERNET_CACHE... Structure ?
What's that ?

Thanks a lot.

MagicMac. :)
Posted on 2001-10-05 14:17:13 by magicmac
My dear friend MagicMac!!!
I'm sorry about last wednesday..University garbage don't let me live properly..

The third parameter is a Long Pointer to a Double Word.

This would do it:


MyDword DWORD ?




The OFFSET to the Dword variable is the LPDW.

Those are my two centavitos la Buta Maaaaaaaaiiiiiiiiiiiii!!!!!

Posted on 2001-10-05 15:44:35 by latigo
Thanks my friend ... Forget about Wednesday, It's OK ...

-MagicMac. :)
Posted on 2001-10-05 16:29:12 by magicmac