views:

25

answers:

0

I created a ATL/COM project, and implement the IShellExtInit interface. In the Initialize method, I use the DrapDropFile function to get the file names of the files whose selected in the folder.

e.g.

1.In the folder C:\WINDOWS\MyFolder\ contains the files:

a.png, b.bmp, c.jpg

2.Right click the "b.bmp".

3.In the Initialize method, I get a list of file names.

fileNames[0] = C:\WINDOWS\MyFolder\b.bmp

fileNames[1] = C:\WINDOWS\MyFolder\c.jpg

fileNames[2] = C:\WINDOWS\MyFolder\a.png

Question:

How can I get the actual sequence of the file.( a/b/c not b/c/a )

Expect:

1.Right click the "b.bmp".

I get the file name: C:\WINDOWS\MyFolder\a.png

2.Right click the "a.png".

I get the file name: C:\WINDOWS\MyFolder\a.png