Results 1 to 40 of 487

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

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

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

    OLEEXP : Modern Shell Interfaces
    Current Version: 6.8 (Released 06 November 2025)
    Go to: Download | Changelog

    MAINTENANCE MODE: oleexp will no longer receive feature updates, only bug fixes, as I've moved to twinBASIC, the backwards compatible true successor to VB6. There, oleexp is superseded by my Windows Development Library for twinBASIC (WinDevLib) project, which contains 100% of oleexp plus 15,000+ APIs and additional interfaces, all with x64 support.

    About Project


    oleexp.tlb is a type library containing a vast collection of Windows COM interfaces, forking an older project in order to bring in the expansive set of new stuff introduced in Windows Vista through 11. It also includes virtually all structures, types, and enums used by these interfaces, and a limited set of related APIs. While some of the interfaces may be present in system libraries, these, and the original versions for everything from the SDK, often use variable types that are incompatible with VB5/6; all interfaces have been reviewed and modified to use variable types that ensure compatibility with VB5 and VB6.

    History

    oleexp is based on Edanmo's olelib, forked and expanded. It's a very strong foundation for any desktop application.
    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 fork and expand olelib, particularly since anyone using oleexp would almost certainly be using olelib.

    This project is completely free to use and modify as you see fit, for any purpose, including commercial. All that's requested is an acknowledgement and if you're distributing a modified version publicly, to change the project GUID to avoid conflicts, found in oleexp.odl.

    Requirements and Installation / Setup


    Requirements
    oleexp can be used with any version of Windows. If you attempt to call an interface/API that is not present on the current OS version, an error will occur, but the presence of those definitions in the library do not effect the usage of any other interfaces/APIs.
    No other files are required. You do not need to add oleexpimp or mimelib unless you specifically want to use them. All of the addon modules are optional, but mIID is strongly recommended; it saves a ton of time by allowing direct IID_ / FOLDERID_ / etc usage without having to convert a string to a GUID.

    Installing oleexp
    oleexp.tlb (and oleexmpimp.tlb/mimelib.tlb if you're using them) should be placed in a common folder all projects can access-- typically SysWow64 (or System32 on a 32-bit Windows install). You can register it manually, but I've never had trouble with the registration VB6 performs when you add it for the first time.
    IMPORTANT: oleexp is a common file, and you should only have one copy installed. Do not place multiple copies in the folders of projects that use it. Also, it's a direct replacement for olelib; a project should not have both.

    The add-on modules are updated too, so those and any other files you're keeping, should go in a common directory for your VB projects, not the system folder. E.g. all the sample projects point at ..\tl_ole by default, so if you keep your projects in C:\vb\Prj1 Prj2 etc, a good spot would be C:\vb\tl_ole.

    Setting up oleexp in your project
    VB6
    oleexp.tlb is added via Project->References. As with any typelib, a sample project may reference a different location, if so, update the location if the References window says it's 'MISSING:'
    twinBASIC
    It is strongly recommended you switch to WinDevLib, since oleexp cannot support x64 and has far less content. However, you can use oleexp in tB. It's added via References->Available COM References. After that, check the Enabled Libraries tab: if the Library Symbol is oleexpCtl, change it to oleexp, and scroll all the way to the right and uncheck the "Use ActiveX Controls" column.

    NOTE: Like all TLBs, oleexp is a dependency only for the IDE. Once your project is compiled, the TLB is no longer used. It does not need to be present on end user machines. See the 'File Size' section in post #2 for additional details.

    Sample Projects (59)


    NEW! [VB6, twinBASIC] Multi-path IContextMenu (inc. multiple drives) - A novel method to provide a complete solution for this difficult problem.

    [VB6, twinBASIC] ucSimplePlayer: Simple video playback control - A wrapper of the IMFPMediaPlayer interface.

    [VB6, twinBASIC] Code snippet: Toggle airplane mode - Shows use of the new undocumented IRadioManager interface.

    [VB6, twinBASIC] DirectComposition Effects Demo - Shows a basic example of using DirectComposition/Direct2D in VB6 (and twinBASIC with 64bit compatibility!)

    [VB6/Win7+] Using the Windows UI Ribbon Framework - Take advantage of the fancy Ribbon seen in Explorer, Wordpad, and Paint (and very similar to Office) in your app. Brings the basic version of my twinBASIC series to VB6.
    IUIRibbonFramework, IUIApplication, IUISimplePropertySet, IUICommandHandler

    [VB6/twinBASIC/Win8+] Displaying emojis with color - Using oleexp's recently added DirectX interfaces to render text with the emojis in color (where supported by the font).

    [VB6/twinBASIC] Code snippet: Close Explorer window by path - A simpler example of using IShellWindows to enumerate all open Explorer windows.

    [VB6/twinBASIC] Code snippet: Run unelevated app from elevated app - By making Explorer do it.

    [VB6] Using IShellWindows to register for SHOpenFolderAndSelectItems - Register a path as a shell window, then apps using the API will pass the full names of files to be opened in it.
    IShellWindows, IServiceProvider, IWebBrowserApp, IShellView

    UPDATED 18 Jun 2022 [VB6] ucShellBrowse: A modern replacement for Drive/FileList w/ extensive features - A highly customizable UserControl for browsing the file system with all the modern shell features; customize from a simple Directory List / FileList control in VB through a full-fledged Explorer-like window, and everything in between.
    First use: IColumnManager, ICategoryProvider, ICategorizer, IPropertyStoreCapabilities, IPropertyEnumType, IPropertyEnumTypeList; dozens of others previously demonstrated.

    UPDATED 25 Jan 2022 [VB6] ucShellTree: Full-featured Shell Tree UserControl - A TreeView for navigating the shell like ucShellBrowse.

    [VB6, Vista+] Core Audio - Peak Meter - Check whether or not audio is playing on the default rendering device, and display the most recent peak volume level in a meter.
    IAudioMeterInfo, IMMDevice, IMMDeviceEnumerator

    [VB6] Write MP3 Album Art and other tags using the Windows Property System - You can use the Property Store interfaces to add cover art, and all the traditional tags, to your MP3 files.
    IPropertyStore, IShellItem2

    [VB6] Intro to the Windows Imaging Component (WIC): Scale and convert to JPG or PNG - Open a variety of image types then optionally scale and convert to PNG or JPG.
    IWICImagingFactory, IWICBitmapDecoder, IWICBitmapFrameDecode, IWICFormatConverter, IWICBitmapScaler, IWICBitmapSource, IWICBitmapEncoder, IWICStream, IWICBitmapFrameEncode, IPropertyBag2

    [VB6] Using Structured Queries to conduct a Windows Search by any property - Advanced Windows-provided file searching technique
    ISearchFolderItemFactory, IConditionFactory2, ICondition, IObjectCollection, IShellLibrary, IShellItemArray

    [VB6] Adding Custom Tasks and Items to the Jump List (Taskbar Right-click) - Shows how to use ICustomDestinationList to add items to the Jump List.
    ICustomDestinationList, IObjectCollection, IObjectArray, IShellLink, IPropertyStore

    [VB6] Virtual File Drag Drop - Virtual files are created from data that's only read when dropped, instead of beforehand. Uses some neat IDataObject tricks and also supports multiple files at once.
    IDataObject, IStream

    [VB6] Display search results or other custom file set in IExplorerBrowser - Display a set of files from anywhere in the system as if they were in one folder.
    IResultsFolder, IExplorerBrowser, IColumnManager

    [VB6, Win8+] Using the system spellchecker: Add spellcheck with only a few lines - A demo of Win8's new spellchecking feature.
    ISpellChecker, ISpellCheckerFactory, ISpellingError, IEnumSpellingErrors, IEnumString

    [VB6] Class to show a standard Explorer-style progress window - Use the IProgressDialog interface to show progress with an Explorer-style popup.
    IProgressDialog

    [VB6, Vista+] Enumerate, explore, and change all file associations - Use IQueryAssociations to get information about all registered file types.
    IQueryAssociations, IAssocHandler, IEnumAssocHandlers, IOpenControlPanel

    [VB6, Vista] List the Recycle Bin location(s) on a drive - Use folder class IDs to find the official folders.
    IPersist, IKnownFolderManager, IKnownFolder, IEnumShellItems, IShellItem

    [VB6] Dynamic Resize: Use a slider to change ListView icon/thumbnail size on the fly - Smooth and fast resizing without any quality loss.
    IImageList2, IShellItemImageFactory

    [VB6] Exclude file types from Open/Save Dialogs ('all except...'): IShellItemFilter - Instead of selecting which files to show, select which ones to hide.
    IShellItemFilter, IFileOpenDialog, IShellItem

    [VB6, Vista+] Finding and deleting invalid shortcuts with IShellLink and IShellItem Find and remove bad links with IShellLinkW and a new recursive file enumeration/search method using only IShellItem and IEnumShellItems.
    IShellLinkW, IPersistFile, IEnumShellItems, IShellItem, IFileOpenDialog

    [VB6, Vista+] Core Audio - Monitor for disabled/active, default, and property changes - Shows how to use IMMNotificationClient to be notified when audio hardware is added/removed, enabled/disabled, set as default, or had its properties change
    IMMDeviceEnumerator, IMMDevice, IMMNotificationClient, IPropertyStore

    [VB6, Vista+] Core Audio - Change the system default audio device - Uses an undocumented interface to change this much sought-after setting through code.
    IPolicyConfig, IMMDeviceEnumerator, IMMDeviceCollection, IMMDevice

    [VB6] SHBrowseForFolder - Custom filter for shown items: BFFM_IUNKNOWN/IFolderFilter - Shows what to do to actually implement a filter using that weird BFFM_IUNKNOWN message you've seen.
    IFolderFilter, IUnknown, IShellFolder, IShellItem

    [VB6, Vista+] Add the Windows Send To submenu to your popup menu - Uses shell interfaces to implement the Send To menu exactly as Explorer does.
    IShellItem, IShellItemImageFactory, IDataObject, IDropTarget, IEnumShellItems, IShellItemArray, IFileOpenDialog

    [VB6, Vista+] Direct access to the system-wide image thumbnail cache - Uses the LocalThumbnailCache object for advanced access.
    IThumbnailCache, ISharedBitmap, IThumbnailProvider, IShellItem

    [VB6, Vista+] Remember Open/Save state per-dialog instead of per-app (IFileDialog) - The .SetClientGuid method enables automatic saved states per-dialog.
    IFileDialog/IFileOpenDialog, IShellItem

    [VB6] Using IAutoComplete / IAutoComplete2 including autocomplete with custom lists - Shows using autocomplete and IEnumString with oleexp interfaces. Supports custom lists and multiple sources.
    IAutoComplete, IAutoComplete2, IAutoCompleteDropDown, IEnumString, IACList, IACList2, IObjMgr

    [VB6, Vista+] Advanced Thumbnail ListView: Icons, images, videos, framed small images Uses shell interfaces and GDI+ to make a top-tier thumbnail view that handles every type of file.
    IShellItemImageFactory, IExtractImage, IShellItem[2], IShellFolder, IShellIcon, IShellIconOverlay, IParentAndItem, IEnumShellItems, IImageList

    [VB6] Drag drop any format to other apps without custom IDataObject - Drag and drop CF_TEXT, CFSTR_PNG, and more without having to implement IDataObject. Now with sample project.
    IDataObject, IDragSourceHelper2

    [VB6] Register any control as a drop target that shows the Explorer drag image - With IDropTargetHelper, any XP+ app can now show the same drag image as any modern program.
    IDropTarget, IDropTargetHelper

    [VB6, Vista+] Core Audio Basics - Demonstrates the new Core Audio interfaces added in v3.6
    IMMDeviceEnumerator, IMMDeviceCollection, IMMDevice, IAudioEndpointVolume, IAudioEndpointVolumeCallback, ISimpleAudioVolume, IAudioSessionManager2, IAudioSessionControl, IAudioSessionControl2

    [VB6] Code Snippet: View shortcut path w/variables unexpanded: IShellLinkDataList, and
    [VB6] Code Snippet: Make your shortcuts request elevation with IShellLinkDataList - An introduction to the advanced flags and data blocks hidden behind IShellLink.
    IShellLink (IShellLinkW), IShellLinkDataList, IPersistFile

    [VB6] Code Snippet: Get file overlay (e.g. shortcut arrow), inc. customs like DropBox - There's way more to system icon overlays than shortcuts and shares, now you can easily find the other Windows ones and custom ones.
    IShellIconOverlay, IShellFolder

    [VB6] Get extended details about Explorer windows by getting their IFolderView - Get that interface and many more for highly detailed information about open Explorer windows and their items. Changing window settings and selections is also possible.
    IShellWindows, IFolderView, IFolderView2, IShellBrowser, IShellView, IEnumVARIANT, IShellItem, IDispatch

    [VB6, Vista+] List all file properties, locale/unit formatted, by modern PROPERTYKEY - Demonstrates use of the modern PROPERTYKEY/IPropertyStore system, with PROPVARIANT handling made simple. Update includes a new sample project attached displaying a ListView of properties and using IPropertySystem to create a property display management technique.
    See Also: A compact function to retrieve any property by name, which loads a property store directly by file name without IShellItem, and then displays a formatted string for anyone property name.
    IPropertyStore, IPropertyDescription, IPropertySystem, IShellItem2, IShellFolder2

    [VB6, Vista+] SHBrowseForFolder: Handling a choice of Libraries (or Library), Computer, or Network - Some objects aren't valid folders themselves, but contain valid folders, and the user probably expects those objects to be treated like any other parent folder. Shell interfaces to the rescue!
    IShellLibrary, IShellItem, IShellItemArray, IEnumShellItems

    [VB6] Easy image disp/edit; scale/rotate, show animated gifs, conv2JPG, +more; No GDI+/DLL - Shows off oleexp 3.1's new image interfaces, which make dealing with images and imagelists far easier. Scale, rotate, show animated GIFs, transcode to JPG/BMP, get image properties, resize an imagelist, all with mostly single-line calls.
    IShellImageData, IShellImageDataFactory, ITranscodeImage, IImageList, IImageList2, IShellItem, IFileOpenDialog, IShellItem, IShellItemArray, IEnumShellItems, IPersistFile, IExtractImage.

    [VB6] Code Snippet: Get/set/del file zone identifier (Run file from internet? source) - How does Explorer know to ask? Get the basics of Alternative Data Streams and see how to change this one extremely easily thanks to IZoneIdentifier and its coclass PersistentZoneIdentifier.
    IZoneIdentifier, IInternetSecurityManager

    [VB6] Basic unzip without 3rd party DLL or shell32- IStorage-based, and
    [VB6] Create a ZIP file without any DLL depends using IStorage and IDropTarget - Uses IStorage and IStream for basic zip functionality. Creating a Zip uses a neat trick with IDropTarget.
    IStorage, IStream, IEnumSTATSTG, IShellFolder, IDropTarget

    [Vista+] Code Snippet: Get and set the Rating (stars) of a file - Shows a practical example of using IShellItem/IPropertyStore to read/write properties with very few lines of code.
    IPropertyStore, IShellItem2

    [VB6] IPreviewHandler: Show non-image file previews from any reg'd preview handler - Don't limit your previews to just images anymore; documents, music, videos, PDFs, Powerpoint/Excel, and lots more have existing or available preview handlers you can access with IPreviewHandler.
    IPreviewHandler, IInitializeWithFile, IInitializeWithStream, IInitializeWithItem, IUnknown

    [VB6, Vista+] Code snippet: KnownFolders made easy with IKnownFolderManager - The KnownFolderManager coclass (a default implementation you can get with the New keyword) greatly simplifies all aspects of working with special folders, their locations, properties, names, and identifiers.
    IKnownFolderManager, IKnownFolder, IShellItem, IShellItemImageFactory

    [VB6, Vista+] Host Windows Explorer on your form: navigation tree and/or folder - Use IExplorerBrowser and INamespaceTreeControl as a simple way (they have default implementations-- you don't even need a ListView, the whole thing is automatically created right on your form) to add a full-fledged Explorer view to your form.
    IExplorerBrowser, IExplorerBrowserEvents, INamespaceTreeControl, INamespaceTreeControlEvents, IDataObject, IShellView, IShellItem

    [VB6] API File Drag from multiple paths w/o native OLE or dragsource, SHDoDragDrop - Create an IDataObject with SHCreateDataObject/SHCreateFileDataObject to initiate a drag operation with very low-level access to all elements of the drag operation. Later comments in the thread show the use of DragDropHelper coclass (IDragSourceHelper, IDragSourceHelper2).
    IDataObject, IDragSourceHelper2

    [VB6] Enhanced Tray Message w/ custom ToolTip icon and feedback, w/o ShellNotifyIcon - Uses the new IUserNotification2 interface (Vista+)
    IUserNotification2

    [VB6] List files by level from a folder in natural sorted order using INamespaceWalk - A unique way of listing files with it's own Windows-managed progress dialog.
    INamespaceWalk, INamespaceWalkCallback, IShellFolder

    [VB6] List/Execute File Handlers: IAssocHandler and IAssocHandlerInvoker (Vista+) - Get names, paths, and icons for all of a file type's handlers, and use it to show your own Open With menu.
    IAssocHandler, IAssocHandlerInvoker, IEnumAssocHandlers

    [VB6] Win7 Taskbar Features with ITaskbarList3 (overlay, progress in taskbar, etc) - Windows 7 allows you to add an overlay icon, turn the taskbar item into a progress bar, add buttons below the thumbnail, and more. See how to use the new ITaskbarList3 / 4 interface in VB with the TaskbarList object from oleexp.
    ITaskbarList4

    [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 progress feedback.
    IFileOperation, IFileOperationProgressSink, IShellItem, IShellItemArray, IShellFolder

    [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.
    IFileDialog2, IFileDialogCustomize, IFileOpenDialog, IFileSaveDialog, IFileDialogEvents, IShellItem, IShellItemArray, IEnumShellItems

    [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.
    IShellLibrary, IShellItem, IShellItemArray, IEnumShellItems

    ...more to come soon!


    64bit Support for twinBASIC



    [twinBASIC] WinDevLib - Windows Development Library for twinBASIC (x64-compatible successor to oleexp) :: VB Forums Project Thread :: Project GitHub Repository


    Add-Ons

    Add-ons are optional modules full of definitions related to a particular feature set, like a header #include in other languages. Like adding mPKEY.bas is exactly the same as '#include propkey.h' in a C/C++ project. Only the items you actually use get compiled into the .exe, so don't worry about a bloated executable containing unused GUIDs.

    mIID.bas (UPDATED with 6.6) - All IID_/BHID_/FOLDERID_/SID_ values, usable directly without CLSIDFromString, e.g. SHCreateItemFromIDList(pidl, IID_IShellItem, psi), never have to worry about converting a string. Strongly recommended for all oleexp projects.

    mPKEY.bas - All PROPERTYKEY's from propkey.h, directly usable.

    mCoreAudio.bas / mDirectShow.bas / mPortableDevices.bas / mWIC.bas / mDirectX.bas / mSpeech.bas / mUIA.bas / mMF.bas - IIDs and functions used exclusively by those particular features.




    IMPORTANT: DUE TO ATTACHMENT SIZE LIMITS, THE DOWNLOAD STRUCTURE HAS CHANGED. READ ZIP CONTENTS.
    Included in the ZIP

    oleexp68-core.zip
    • oleexp.tlb v6.8
    • Core addon: mIID.bas
    oleexp68-addons.zip
    • Full changelog
    • oleexpimp.tlb v2.6 - Expanded fork of olelib2.tlb, replaces olelib2.tlb; replace all 'olelib2.<type>' with 'oleexpimp.<type>'
    • Additional addons: mPKEY.bas, mCoreAudio.bas, mDirectShow.bas, mDirectX.bas, mPortableDevices.bas, mSpeech.bas, mUIA.bas, mWIC.bas, and mMF.bas
    • mimelib.tlb - Original compiled against oleexp; won't work with it otherwise.
    • oleexpwmp.tlb - Remove wmp.dll depend from main TLB.
    oleexp68-src.zip
    • Source for TLBs
    • Originals of modified olelib files
    • Compile shortcuts
    Attached Files Attached Files
    Last edited by fafalone; Feb 28th, 2026 at 02:14 PM. Reason: Update info

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width