Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get path from save as dialogbox
#8
From CDM_GETFOLDERPATH reference in MSDN:
Quote:The dialog box must have been created with the OFN_EXPLORER flag; otherwise, the message fails.
Probably created without this flag. I don't know how to get path then.

Macro get other process string from PEB - command line, current directory etc
Code:
Copy      Help
;http://wj32.org/wp/2009/01/24/howto-get-the-command-line-of-processes/

int w=win("Save As" "#32770")

__ProcessMemory m.Alloc(w 1000)

PROCESS_BASIC_INFORMATION pbi
if(NtQueryInformationProcess(m.hprocess 0 &pbi sizeof(pbi) 0)) ret
byte* pp
m.ReadOther(&pp pbi.PebBaseAddress+16 4)
;out pp
UNICODE_STRING us
m.ReadOther(&us pp+0x24 8) ;;current directory
;m.ReadOther(&us pp+0x40 8) ;;command line
;m.ReadOther(&us pp+0x38 8) ;;image path
out us.Length
BSTR b.alloc(us.Length)
m.ReadOther(b.pstr us.Buffer us.Length*2)
out b

;note: this code is only for 32-bit. Tested only on Windows 7.


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)