Page 10 of 10 FirstFirst ... 78910
Results 361 to 378 of 378

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

  1. #361
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,268

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

    Quote Originally Posted by fafalone View Post
    I apologize to the handful of people who've already downloaded the new 6.5 release, I forgot to include the new radio management APIs in the build list, and the source file was missing the IRadioManager interface that toggles airplane mode.

    Please grab the new oleexp65-R1.zip if you originally had oleexp65.zip.
    No problem, Fafalone. I (for one) appreciate all the work you've done with this thing. Also, not sure I see the problem with returning HRESULT.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  2. #362

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,024

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

    Thanks

    HRESULT... In C/C++ there's no automatic error handling... an interface method informs you an error occurred by returning a negative HRESULT. VB consumes this and hides it for its automatic error handling system. In C/++ you have to check it yourself; in VB, VB checks it, and raises an error you can handle with 'On Error GoTo' on 'On Error Resume Next'.

    The problem is VB is essentially treating every error as a critical failure with the 'GoTo' option... a lot of the time, you don't want to jump out to an error handler and abandon the entire method, for example with enumerators-- running out of items is the inevitable end of a COM enumeration. On Error GoTo sucks for that. But Resume Next, you often don't want to disable VB's natural error handling for all the VB-native code too, so you might find yourself needing to change error handling tons of times.

    Personally I wish there was an option for 'Ignore errors for interfaces I've defined' option. That's what nebeln is essentially trying to do. The problem is a lot of people don't *want* to be responsible for all the error handling themselves, and VB (and tB for now) never built the special handling required to allow Implements where there's no HRESULT. (It's more complex than you'd think, after talking to Wayne about how it can be implemented-- essentially in tB when this is supported, you'll be forfeiting automatic error handling and will have to both handle internal errors yourself and be responsible for HRESULT codes returned to outside callers). Another issue is all the SDK examples are in C++, and it's tough when you're just learning how to use all these interfaces to re-architect the code you're porting to account for not doing like the SDK and handling errors with SUCCEECED but instead jumping out of the code flow. Struggled with it myself at the beginning; still forget to handle it right sometimes.

    VB6 adds to the complications in that if you do leave it as HRESULT, it sometimes messes with the error info. tB has Err.LastHResult to help with this; it guarantees accuracy for the last HRESULT independent from the VB translation of Err.Number.

    There's a very strong bias against OERN in the community, but I find myself more and more wanting to just use it for entire methods in oleexp/WDL-heavy calls. Especially when I don't really understand what I'm doing; like my DirectComposition example, every method is OERN so I could follow the SDK as closely as possible.

  3. #363
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    544

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

    [EDIT]

    Ignore the post below.

    The old TLB did not need to be unregistered. I just had to read and follow the upgrade instructions fafalone provided here.

    =====

    I have an older version of this type lib (v4.2 from 2017) which I'm trying to unregister so that I can register the new one so that I can use your ucShellBrowse control which is my ultimate goal in this. But I'm coming up against the following error when I try to run "regsvr32 /u" on the old version of the TLB:

    "The module oleexp.tlb may not be compatible with the version of Windows that you're running. Check if the module is compatible with an x86 (32-bit) or x64 (64-bit) version of regsvr32.exe."

    I'm on Windows 10, 64 bit. I've tried both the 32 and 64 bit versions of regsvr32. I'm running the Command Line as admin. Nothing works.

    I don't normally have issues registering and unregistering files.

    Help! Anyone???
    Last edited by AAraya; Apr 19th, 2024 at 11:56 AM.

  4. #364
    Frenzied Member VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    1,635

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

    Regsvr32 only works with DLL and OCX files. Just overwrite your old oleexp file with the latest version and you're done.

  5. #365
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    544

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

    Quote Originally Posted by VanGoghGaming View Post
    Regsvr32 only works with DLL and OCX files. Just overwrite your old oleexp file with the latest version and you're done.
    Yeah, I knew that years ago when I regularly worked with TLB files. It's been a while since I've had to update one. Thanks for the refresher!

  6. #366

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,024

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

    There's some benefits to a TLB that needs to be registered/reregistered properly every upgrade, but I've avoided triggering that requirement just so you never need to worry about registration with oleexp.

    Specifically, you know that error you sometimes get with passing UDTs 'Only publicly defined blahblahblah'... well those can be avoided if you associate a GUID with the UDT. But then you can't just overwrite the old typelib or things go off the rails; you have to unregister it, overwrite, and register (albeit not with regsvr32, but a typelib-specific tool).

  7. #367

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,024

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

    Project Updated - oleexp v6.6

    (oleexp 6.6 - Release 06 June 2024)
    -Added Direct3D 9 interfaces(courtesy of The trick for the core interface set
    -Added DXVA2 and DXVAHD interfaces
    -Added all Background Intelligent Transfer Service interfaces and coclasses
    -Large expansion of Direct3D 12 interfaces
    -Added Direct3D 12 Video interfaces
    -Some misssing Direct3D 11 interfaces
    -Added Windows Media Device Manager interfaces and coclasses
    -Added DirectML interfaces (directml.h, 100%)
    -Added Virtual Disk Service interfaces
    -Added UPnP interfaces (upnp.h, upnphost.h, 100%)
    -Added INATExternalIPAddressCallback Interface, for use with NATUPnP Type Library v1.0 (NATUPNPLib, included with Windows)
    -Added VBA-related interfaces from vbinterf.h (100% coverage)
    -(Bug fix) MFMEDIASOURCE_CHARACTERISTICS, MF_SOURCE_READER_FLAG, and MF_SOURCE_READER_CONTROL_FLAG enums all values incorrect.
    -(Bug fix) SHCreateStreamOnFileEx was defined in wrong dll.
    -(Bug fix) The following UDTs contained unsupported types: LOGPALETTE, NETRESOURCE, OLEUICONVERT, PUBAPPINFO, KSJACK_SINK_INFORMATION, D3D12_META_COMMAND_DESC, D3D12_AUTO_BREADCRUMB_NODE1, D3D12_FEATURE_DATA_PROTECTED_RESOURCE_SESSION_TYPES, D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_INFO, SPDISPLAYPHRASE, BASEBROWSERDATAXP, BASEBROWSERDATALH, TOOLBARITEM, and DML_ADAM_OPTIMIZER_OPERATOR_DESC.

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

  8. #368
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,953

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

    It took several years to make this TLB registration DLL registration tool. Because sometimes there are some TLBs referenced in the system, it is impossible to re-register after changing the path. Activex DLLs require administrator privileges to register, and.net DLLs are often registered successfully on different computers but cannot be used. It's really a headache, so I developed this small tool, and it's better to drag files later. The top function is added, but the pop-up dialog box will run to the back of the window and can not be clicked, all kinds of conflicts. Running under LINUX WINE, I accidentally searched out all the DLLs in the C disk. There are more than tens of thousands of data, and the total number has become negative. Then I can only use the API to locate a certain line and get the current data. But the event of the control cannot be used again. Widgets are also sometimes a lot of work, containing 10-50 technical difficulties.
    Attached Images Attached Images  

  9. #369

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,024

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

    I can't understand what you're talking about and it seems unrelated to oleexp.

    oleexp has lighter registration requirements than OCX controls or some other typelibs because it doesn't use registered types; you can just overwrite old versions with new versions or use a register/unregister tool that calls these simple APIs;

    Code:
    Declare Function LoadTypeLib Lib "oleaut32" _
                                  (ByVal szFileName As Long, _
                                  lplptlib As Any) As Long   ' lplptlib As Long
    
    Declare Function RegisterTypeLib Lib "oleaut32" _
                                  (ByVal ptlib As Any, _
                                  ByVal szFullPath As String, _
                                  ByVal szHelpDir As String) As Long
    
    Declare Function UnRegisterTypeLib Lib "oleaut32" _
                                  (GUID As GUID, _
                                  ByVal wVerMajor As Long, _
                                  ByVal wVerMinor As Long, _
                                  ByVal lcid As Long, _
                                  ByVal SYSKIND As SYSKIND) As Long
    
    'or newer x64 compat defs
    Public DeclareWide PtrSafe Function RegisterTypeLib Lib "oleaut32" (ByVal ptlib As ITypeLib, ByVal szFullPath As String, Optional ByVal szHelpDir As String) As Long
    Public Declare PtrSafe Function UnRegisterTypeLib Lib "oleaut32" (ByRef libID As UUID, ByVal wVerMajor As Integer, ByVal wVerMinor As Integer, ByVal lcid As Long, ByVal SYSKIND As SYSKIND) As Long
    Public DeclareWide PtrSafe Function RegisterTypeLibForUser Lib "oleaut32" (ByVal ptlib As ITypeLib, ByVal szFullPath As String, ByVal szHelpDir As String) As Long
    Public Declare PtrSafe Function UnRegisterTypeLibForUser Lib "oleaut32" (ByRef libID As UUID, ByVal wVerMajor As Integer, ByVal wVerMinor As Integer, ByVal lcid As Long, ByVal SYSKIND As SYSKIND) As Long
    Last edited by fafalone; Jun 7th, 2024 at 04:15 AM.

  10. #370
    Addicted Member
    Join Date
    Jun 2010
    Posts
    200

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

    fafalone, just to follow up on this and to clear out any confusion xiaoyao's post may have created. I have "OLEEXP - Modern Shell Interfaces for VB6, v4.7" as oleexp.tlb in SysWow64. So I can just overwrite that one with version 6.6, right?
    M$ vs. VB6 = The biggest betrayal and strategic mistake of the century!?

  11. #371

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,024

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

    Quote Originally Posted by 7edm View Post
    fafalone, just to follow up on this and to clear out any confusion xiaoyao's post may have created. I have "OLEEXP - Modern Shell Interfaces for VB6, v4.7" as oleexp.tlb in SysWow64. So I can just overwrite that one with version 6.6, right?
    Yes that's correct.

    There's an issue with doing that for 4.6 or earlier since I inadvertently changed the project GUID in 4.7, but it's been the same ever since so simple overwriting is only a problem for 4.6 and earlier. 4.7 and up are good. You'd only need to use the unregister/register method if you wanted to change the path of newer versions.

  12. #372
    Addicted Member
    Join Date
    Jun 2010
    Posts
    200

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

    Ok, that was interesting/useful information, because when I look in VB6's references dialog I also see OLEEXP - olelib With Modern Interfaces v4.62, but in a local forder outside of system folders. Is this your old version then? I have no clear memory of why I have it there so that's why I ask, but it's not "in use" by any of my projects so can just be deleted then?
    M$ vs. VB6 = The biggest betrayal and strategic mistake of the century!?

  13. #373
    Addicted Member
    Join Date
    Jun 2010
    Posts
    200

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

    Ops, at a closer look I see that the oleexp.tlb file is not even present in that non-system folder anymore, so this is obviously some leftover in the registry. Which leads to the question, is it possible to unregister it without the file present?

    EDIT: Found the old zip file so nop with missing file.
    Last edited by 7edm; Jun 7th, 2024 at 04:46 AM.
    M$ vs. VB6 = The biggest betrayal and strategic mistake of the century!?

  14. #374
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,953

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

    Quote Originally Posted by 7edm View Post
    Ops, at a closer look I see that the oleexp.tlb file is not even present in that non-system folder anymore, so this is obviously some leftover in the registry. Which leads to the question, is it possible to unregister it without the file present?

    EDIT: Found the old zip file so nop with missing file.
    It should be possible. So my registration tool is based on this principle, first-register the old version, then un registration, and then register the new version.

    At the earliest time, my tool was only dedicated to t1b registration.Because after the TLB reference, if you move the location of the file, you will fail to re-register. Especially the one with the same name but a different GUID.

    The first step is to find the old version, re-register it first, and then uninstall the registration.You can put tlb file in any director.

    Then register a new tlb file, which basically requires three steps.
    Last edited by xiaoyao; Jun 7th, 2024 at 06:11 AM.

  15. #375

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,024

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

    Great, go make your own thread for your tool.

    Here's a much simpler one by Brad Martinez (his website is long-since defunct, there were tons of great projects on it).

    Attached Files Attached Files

  16. #376
    Addicted Member
    Join Date
    Jun 2010
    Posts
    200

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

    Great! Did the job.
    M$ vs. VB6 = The biggest betrayal and strategic mistake of the century!?

  17. #377
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,953

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

    about regtypelib.zip
    Does he have a 64-bit version of the source code?

    Test whether the 64-bit system can be used.
    In the future, if a piece of code can support both 32-bit and 64-bit.
    At the same time, it is more convenient to do the attributes of the two platforms.
    You can add such a flag attribute to it.
    (for x64/x86)
    Because Vba and twinbasic need 64 bits.

    You are the biggest contributor in the world to the expansion of TLB's various functions.

    You use your spare time to complete these free products. Contributed hundreds of thousands of dollars of intellectual power to our CP community.
    Last edited by xiaoyao; Jun 7th, 2024 at 12:01 PM.

  18. #378

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,024

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

    oleexp.tlb is for 32bit only, it will not work with 64bit tB or VBA.

    For 64bit tB, as the first post notes, I have a replacement called 'Windows Development Library for twinBASIC' (WinDevLib). It covers 100% of oleexp.tlb and also has 6000+ of the most common APIs declared.

Page 10 of 10 FirstFirst ... 78910

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