Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1540

[VB6] Modern Shell Interface Type Library - oleexp.tlb

$
0
0
oleexp.tlb : Modern Shell Interfaces
Current Version: 1.3
Previously the latest version of this sub-project was just included in whatever code I released that depended on it, but now I'm going to make it stand as individual project.

So back in the day, E. Morcillo released the very comprehensive interface library olelib.tlb (Edanmo's OLE interfaces & functions). It contained a massive number of interfaces, enums, structs, etc. But after a point it was no longer updated and thus doesn't have any interfaces from Windows Vista or Windows 7. So I set out to bring these interfaces to VB, and quickly realized that so much would have to be duplicated and would then be conflicting, that the only sensible way to approach this would be to create an expansion library based on olelib.

I've kept it as a separate type library, oleexp.tlb, and made minimal changes to the original olelib.tlb to maximize compatibility, although some changes were needed that may require minor code changes (including oleexp as a reference, turning subs into functions). I'll elaborate on these more below.

New Interfaces
Interfaces added by oleexp (v1.3):
interface IEnumIDList;
interface IShellFolder;
interface IShellFolder2;
interface ITaskbarList3;
interface ITaskbarList4;
interface IShellItem;
interface IShellItem2;
interface IShellItemImageFactory;
interface IThumbnailProvider;
interface IEnumShellItems;
interface IShellItemArray;
interface IShellLibrary;
interface IObjectWithPropertyKey;
interface IPropertyChange;
interface IPropertyChangeArray;
interface IProgressDialog;
interface IOperationsProgressDialog;
interface IFileOperationProgressSink;
interface IFileOperation;
interface IContextMenu3;
interface IPropertyStore;
interface IObjectArray;*
interface IObjectCollection;*
interface IApplicationDestinations;*
interface ICustomDestinationsList;*
interface IModalWindow;
interface IFileDialogEvents;
interface IShellItemFilter;
interface IFileDialog;
interface IFileSaveDialog;
interface IFileOpenDialog;
interface IFileDialogCustomize;
interface IFileDialogControlEvents;
interface IFileDialog2;
interface IPropertyDescriptionList;

All related structures and enums are also included.

* - Under development; may not bee 100% error free

Sample Projects

[VB6] Use IFileOperation to replace SHFileOperation for modern Copy/Move box/prompts - Also shows usage of IShellItem; now updated to show the Advise method in action- using a class module to implement an interface to get feedback: Have the shell progress dialog (now more detailed) send the operation progress back to your application.

[VB6] Using the new IFileDialog interface for customizable Open/Save (TLB, Vista+) - Has the benefit of allowing easy access to events from the dialog, as well as making it very easy to add your own controls.

[VB6] Working with Libraries (Win7+) - Uses the IShellLibrary interface to get all folders in a library, add more, get the default save location, get the icon, and even create a new library. Also shows the use of IEnumShellItems and IShellItemArray.

...more to come soon!

Changes to olelib.tlb
(olelib v1.9)
-Had to eliminate coclass pointing to ITaskBarList to reassign it to the new ITaskbarList3/4 interfaces; since the CLSID can't be changed, even a new coclass name would result to limiting the new one to the functions of the first.

-IShellFolder, IShellFolder2, and IEnumIDList are not implemented correctly in olelib (some things should be functions instead of subs), so oleexp contains new definitions and they have been removed from olelib. They remain commented out in the source if for some reason you had code depending on the wrong definitions. Any projects using this would now have to include oleexp.

-Included shell32.dll declares and the IFolderFilter interface have been moved to oleexp.tlb. If you're using these in another project you must now include oleexp.tlb in them.

Included in the ZIP
-oleexp.tlb, v1.3
-olelib.tlb, v1.9
-olelib2.tlb and source - Nothing modified from original release; all original files
-Full source for both oleexp and the updated olelib, can be compiled to identical hashes with VS6 MKTYPLIB.
-The originals of source files modified in olelib
-mk.bat and mkex.bat - shortcuts to compile olelib.tlb and oleexp.tlb, respectively. May need to modify if VS6 MKTYPLIB is not in default directory on your system.

------------------------------
Any and all feedback is welcome. Many thanks to E. Morcillo for the olelib foundation, all the olelib source is all his code.
Attached Files

Viewing all articles
Browse latest Browse all 1540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>