Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Anyone else feel this way about file search?  (Read 21143 times)

0 Members and 1 Guest are viewing this topic.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Anyone else feel this way about file search?
« Reply #30 on: February 24, 2009, 02:28:44 PM »
Quote
Shell functions only works
with multiple files in the same directory...
That's easy to fix, If there is less that two files in a directory, just add a bogus file to the directory, but do not shoe it in your results.  8)

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Anyone else feel this way about file search?
« Reply #31 on: February 24, 2009, 03:47:40 PM »
I'm not having any trouble with the file search routines themselves, they work quite flawlessly.


I think I phrased it wrong- what I meant was it will work with multiple files, but they must be in the same folder, for example, I can't show the context menu for say "C:\testfile.txt" and "C:\windows\shell32.dll", but I could show the same menu if testfile.txt was moved to the windows directory.

Also this was the Context Menu display functions, unfortunately it's a huge mess of Shell interfaces, Direct pointer manipulation and Subclassing code that somehow manages to work flawlessly. I went in recently to add the ability to show the menu for multiple files in the same dir, but the low level shell routines and IShellFolder interface methods seem to require the passing of a Folder PIDL and then an array of File PIDLs immediately beneath that folder. Whoever invented this whole PIDL business ought to be given a stern talking too...

In any case- I think the most often used context menu items will suffice- Cut,Copy,Paste, etc. are the most common options used.

It already works with multiple items in the same folder, it checks to make sure they are in the same folder before it tries to show the Explorer menu, and if they aren't it will just show the one I created. Easy as pie... :)


Surprisingly I've already gotten the feature I described in my last post working to the point where I feel comfortable that it's a feasible solution.
I was trying to dereference Null Pointers before it was cool.

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Anyone else feel this way about file search?
« Reply #32 on: February 24, 2009, 09:04:12 PM »
New update, regarding my issues with files such as pagefile.sys.

*resolved*

I decided to get somewhat creative. If "CreateFile" fails to get a handle to the file, then I try to use "FindFirstFile", which to no surprise works (no surprise since the filename was original acquired using the Find API). Thankfully, the WIN32_FIND_DATA structure has some useful information, so the routine simply copies the relevant data to the Class-level "BY_HANDLE_FILE_INFORMATION" structure that I am using to hold the information about the file while the CFile Object is active.


Additionally, my filter structure is working quite well. Here is a screenie for the curious:




Each of the filters shown in the top listview will be editable, removable, and their order can be changed. Just needs a cleanup of the UI. (for example, buttons with the "Add" button for modification of the filters)

The Editing occurs in a separate window- multiple windows can be open for editing different filters simultaneously.


Each Filter will be able to be saved/loaded to/from disk, and of course an entire set of search parameters can be saved as a "filterset".
I was trying to dereference Null Pointers before it was cool.

Broni


    Mastermind
  • Kraków my love :)
  • Thanked: 614
    • Computer Help Forum
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 8
Re: Anyone else feel this way about file search?
« Reply #33 on: February 24, 2009, 09:51:41 PM »
When the beta will be released?

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Anyone else feel this way about file search?
« Reply #34 on: February 24, 2009, 09:57:22 PM »
When the beta will be released?

Soon  ;D

Just need to finish off some UI features. If I'm lucky I won't find any more bugs in my BCFile library and I'll be able to release it during the night  :)

Also I'll defer the while File Change notification business for Post Beta work, that'll save some time.


EDIT: Aye, got an Alpha:

http://www.megafileupload.com/en/file/85636/Distrib-zip.html

sorry about megafileupload... I hate it too. Any good alternatives?
« Last Edit: February 25, 2009, 06:00:03 AM by BC_Programmer »
I was trying to dereference Null Pointers before it was cool.

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: Anyone else feel this way about file search?
« Reply #35 on: February 25, 2009, 06:39:37 AM »
Context menu additions:

Send To
Scan With
Delete.

I see why you hate megafile....

Maybe an alternative...
" Anyone who goes to a psychiatrist should have his head examined. "

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Anyone else feel this way about file search?
« Reply #36 on: February 25, 2009, 06:56:13 AM »
Send To and Delete should be "trivial" to implement- just enumerate the Send To Special folder.

"Scan with" will require some research into the Virus scanner APIs, to inspect the installed Scanning programs.

As it stands now of course my custom multiple selection context menu will only need to be displayed when multiple files are selected that aren't all in the same folder; otherwise the standard Explorer menu will be displayed.

Interestingly enough it is slightly less trivial to add menu items to that menu; menus with submenus (such as "Scan with") probably would make me go insane if I tried to add them.

I'll see how well I go with a "Scan With" option...



As far as file hosting, I've found Fileupyours expires too quickly- but I did find another site that is less annoying:

http://www.sendspace.com/file/2hhknt

*note*- that is no different from the previous version


Anyways.... back to fixing the menus for both the filters and Found files lists...
I was trying to dereference Null Pointers before it was cool.

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: Anyone else feel this way about file search?
« Reply #37 on: February 25, 2009, 07:36:40 AM »
Got the Apha just now...
FYI Windows 7 and my Win2K are going to be the "sacrificial lambs"....

Ewe.
" Anyone who goes to a psychiatrist should have his head examined. "

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Anyone else feel this way about file search?
« Reply #38 on: February 25, 2009, 07:48:14 AM »
heh, two OS versions I haven't tested it on.

Since I don't have an installer yet... the installation is a bit involved... apologies...

EDIT: alright- I have an installer.

this should make future releases easier to dl and install...

http://www.sendspace.com/file/hh2sze
« Last Edit: February 25, 2009, 08:34:47 AM by BC_Programmer »
I was trying to dereference Null Pointers before it was cool.

Broni


    Mastermind
  • Kraków my love :)
  • Thanked: 614
    • Computer Help Forum
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 8
Re: Anyone else feel this way about file search?
« Reply #39 on: February 25, 2009, 01:54:59 PM »
As for hosting, get a free account here: http://www.adrive.com/
It gives you 50GB of a free space.

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Anyone else feel this way about file search?
« Reply #40 on: March 03, 2009, 09:34:53 PM »
Alright, I finally started working on the "killer" feature that I haven't seen in any other file search, or File access library, for that matter.

Alternate data streams.

So far I'm able to enumerate the alternate streams of a file and retrieve their names, which is the hardest part of the whole thing. Once I finish implementing Alternate data stream support into my "BCFile" file access library, I will be able to integrate the whole process into the search program as well. The tricky part will be presenting the information- acquiring stream information is costly when done in a tight loop as it would be during a file search, so it would be costly in terms of performance to display a list of the streams in a file within the listview. So the question is how the heck I'm going to present this information? perhaps the ability to search for streams as well as within them, too- but only adding relevant columns when necessary?

This would be an intrigueing feature, I think- haven't seen one like it in any other search app...
I was trying to dereference Null Pointers before it was cool.

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Anyone else feel this way about file search?
« Reply #41 on: March 23, 2009, 07:40:20 AM »
another release.

An installer.


still requires Run As administrator to work on vista though. I'm pretty sure that's a VB runtime issue.

here


a few issues:

(some right-click options when multiple selecting don't do anything. the explorer context menu is fine, however)

Scan With... will take some time to implement- I could always create the menu from a INI file that can be edited to add appropriate commandlines, but there is a way to enumerate Antivirus applications... it's just ridiculously messy, and uses a lot of direct COM code that VB is supposed to do for me.

Apparently AV programs register a "IOfficeAntivirus" interface in a Component Category, so I would need to use the COM API to retrieve the CLSIDs of each component that is in that category using the COMCAT API, then use a 32-bit integer variable to store the pointer retrieved from it's creation through CoCreateInstance, at which point I would need to copy that into an object of type IUnknown, and then call QueryInterface on that IUnknown to get a reference to it's IOfficeAntivirus Interface, which I will have to find a type library for... Or heaven forbid- try to create it myself...


very messy...

but doable, with enough effort.
I was trying to dereference Null Pointers before it was cool.

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Anyone else feel this way about file search?
« Reply #42 on: March 25, 2009, 11:54:03 AM »
Well- I've decided that Scanning functionality is "easy" enough to add without changing code by editing the MENU XML files- it surely isn't worth the effort for me to re-learn IDL just to define that blasted interface- last time I tried that was for that IDispatchEx, and needless to say that didn't work very well.

In any case, I have successfully implemented the "custom" Open with dialog, shown when file that aren't in the same folder are right-clicked... or, that will be the idea, now it shows it for any multiple-selection right-click.





The "open with", information, much to my amusement, is stored quite plainly in the registry.

using the file extension of the selected file(s), or * if they don't have a common extension, the routine looks at HKEY_CLASSES_ROOT for that extension, and enumerates the  openwithList key, which contains sections that are simply the names of Executables. Additionally it opens the Openwithprogids() and recursively calls itself for those progids found (for example, on my computer ".AIF" has openWithprogIds that reference both AIFFILE as well as an acdsee progid, both of which are also present under hkey_classes_root.

Now armed with a list of Program executable names, I was faced with the task of converting them to absolute paths.

thankfully, the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths key contained all the data I needed (except that mspaint is referenced as pbrush... so that doesn't work...), and I am able to successfully convert it into a full file path.


And then I simply duplicate what was already present for my "Send To" code- IE execute the program and pass along all the files as arguments.

Sorry for the nitty gritty there, I thought it was a convoluted and ridiculously roundabout way of doing things. And of course I had to convert the names to "friendly" names, so I had to use the FileInformation routines with raw buffers. quite messy, but you can't really tell just by looking at it...
I was trying to dereference Null Pointers before it was cool.

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
I was trying to dereference Null Pointers before it was cool.