News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

help with temp files

Started by kodekrazy, September 25, 2005, 03:11:39 PM

Previous topic - Next topic

kodekrazy

I am not very good with asm yet and i was hoping someone could help me with geting the location of special folders such as cookies or ie history. Your help would be much appreciated. thanks

comrade


kodekrazy

i looked at it on MSDN but it didn't help much,i am fairly new to asm, if someone could show me how to use it, it would be very helpful. Thanks for your help by the way.

ToutEnMasm

hello,
A simple example

;declare

;include \masm32\include\advapi32.inc    + lib
;include \masm32\include\shell32.inc       + lib

; define in ShlObj.h
SHGFP_TYPE_CURRENT equ 0
CSIDL_COMMON_DOCUMENTS equ 02eh

;------- data ----
Htoken      dd 0
Chemin    db MAX_PATH + 1 dup (0)
titre db "title",0
;----------- code -----------------------
   invoke GetModuleHandle,NULL
   mov hInstance,eax
   invoke OpenProcessToken,hInstance,TOKEN_READ,addr Htoken
   invoke SHGetFolderPath,NULL,CSIDL_COMMON_DOCUMENTS,Htoken,SHGFP_TYPE_CURRENT,addr Chemin
   
   invoke MessageBox,NULL,ADDR Chemin,addr titre,MB_OK

;---------------------------------------------------------------------------------------------------------------------------------------
                           ToutEnMasm







kodekrazy

thank you so much that is exactly what i needed.