Get current directry...?

delphi package - easy access to shell apis
Post Reply
Armagedon
Posts: 14
Joined: Tue May 27, 2008 4:30 am

Get current directry...?

Post by Armagedon »

Hi.
how i can get current directory and get items(Files & Folders) ?

i am on writing realtime scan for my antivirus.

Thanks.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Hello,

and sorry for the late reply.

For a realtime scan I'd suggest to use the fastest APIs available. That would be FindFirstFileW/FindNextFileW. What do you mean with the "current directory"? Every application has its own "current directory". Do you mean the current directory of your own application? Then simply call the win32 API "GetCurrentDirectory".
Armagedon
Posts: 14
Joined: Tue May 27, 2008 4:30 am

Re:

Post by Armagedon »

madshi wrote:Hello,

and sorry for the late reply.

For a realtime scan I'd suggest to use the fastest APIs available. That would be FindFirstFileW/FindNextFileW. What do you mean with the "current directory"? Every application has its own "current directory". Do you mean the current directory of your own application? Then simply call the win32 API "GetCurrentDirectory".
i am on writing a antivirus
So i need realtime scan feture
i need get current directory to scan files.
sorry for bad english.
thanks.
Armagedon
Posts: 14
Joined: Tue May 27, 2008 4:30 am

Re: Get current directry...?

Post by Armagedon »

"function ShellObj(const idList: IIDList) : IShellObj;"

i should get "IIDList" from active explorer window.
how i can get IIDList from Hwnd ?!!!
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Get current directry...?

Post by madshi »

You mean you want to know which directory a specific explorer window is listing? I don't really know how to do that. There's no official win32 API for getting this information, as far as I know.
Post Reply