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

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,189

    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
    5,903

    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
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    509

    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,538

    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
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    509

    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
    5,903

    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).

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