Page 5 of 5 FirstFirst ... 2345
Results 161 to 176 of 176

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

  1. #161

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,586

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

    I was planning on adding it at one point, can't recall at the moment why I stopped the effort since it looks like was a year ago but it's just the prelimary copy of the SDK, it won't compile in MKTYPLIB and modification to avoid VB6 incompatible arguments isn't complete (looks like I stopped half way on line 886). Left the source in for possible inclusion in the future or if someone else was interested.

  2. #162
    Member
    Join Date
    Jan 2015
    Posts
    40

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

    Non-final report: I removed some includes, gave it a new GUID, compiled it, copied it over to SysWOW64, had to re-reference it in VB IDE (probably because of the new GUID), and everything worked just fine. So I did not exclude anything I needed, good. oleexp.tlb is now 989.352 bytes, so roughly 200 KB smaller. Don't know about the inner counts. So far I had no "Out of memory" error, but it's too early to say. Give me some days...

  3. #163
    Member
    Join Date
    Jan 2015
    Posts
    40

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

    Well, reducing the typelib by commenting out some components seems to have made a difference. The error message has not come up since I did it.

    FYI, these are the parts I took out:

    #include "tasksch.odl";
    #include "exp_explrvw.odl";
    #include "exp_audio.odl";
    #include "exp_dshow.odl";
    #include "exp_netcon.odl";
    #include "exp_listview.odl";
    #include "exp_spellcheck.odl";

  4. #164
    Member
    Join Date
    Jan 2015
    Posts
    40

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

    Update: I now think reducing the size of the typelib did not have such a large effect. The error is coming back even with the smaller typelib.

    I currently assume it might have to do with the Undo/Redo cache of the VB6 IDE. When I get the error I can simply close and reopen the IDE and work on for some hours.
    Last edited by voxy; Oct 2nd, 2018 at 03:34 PM.

  5. #165
    Member Dragokas's Avatar
    Join Date
    Aug 2015
    Location
    Ukraine
    Posts
    583

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

    voxy, maybe it can help.

  6. #166
    Member
    Join Date
    Jan 2015
    Posts
    40

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

    Thanks, but my error is not "Fixed or static data can't be larger than 64K". It's not a compile error at all. It pops while typing or pasting into the IDE, usually when I declare a new variable.

  7. #167
    Member Dragokas's Avatar
    Join Date
    Aug 2015
    Location
    Ukraine
    Posts
    583

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

    I know. Maybe it somehow related.

  8. #168

  9. #169

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,586

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

    Sure thing. Will finish a couple other things and update this weekend.

    Edit: Sorry I haven't updated yet. Forgot what a massive mess of other partially finished things were in the current dev version, was gone for a week, then got wrapped up in something else. Will definitely get it done over the next few days.

  10. #170
    Addicted Member
    Join Date
    Jan 2015
    Posts
    225

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

    I have found one problem
    Code:
    Dim pVal As PROPVARIANT
    Dim iPropStg as IPropertyStorage
    iPropStg.ReadMultiple 1, pSpec, pVal
    this will give a error information
    we can just move the type PROPVARIANT definition from exp_prop.odl to propstg.inc to fix it.
    is that right?

  11. #171

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,586

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

    It's not defined as PROPVARIANT, it's defined as Variant, which should be used in place of PROPVARIANT, which never works right. Use VB's Variant type then PropVariantToVariant (to another VB Variant); you can use the propvariant API's to change types if needed.

  12. #172
    Addicted Member
    Join Date
    Jan 2015
    Posts
    225

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

    but why Variant to replace with PropVariant?

  13. #173

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,586

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

    Well in this particular case, that's how it was defined in the original olelib that this project expanded.

    But more generally, VB doesn't support user-defined structures with unions, so you can't define a real PROPVARIANT period, and always having it as a long pointer to a variable has always failed wherever I've tried it. I've even tried specifically defined propvar structs for certain data types, and things still failed every time. After many hours, using a Variant instead is the only way I've ever been able to use functions that require PROPVARIANT, and they've always worked just about perfectly-- because Variant and PROPVARIANT have very similar internal structures.

  14. #174

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,586

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

    Quote Originally Posted by The trick View Post
    Hi fafalone.
    Can you fix the STGOPTIONS structure definition? Also make StgCreateStorageEx to has the optional parameter.
    It should contain the two short fields instead long, and the long one instead ULONG.
    Thank you in advance!
    Trick in StgCreateStorageEx how do I declare it to be optional? It's saying 'invalid attribute for this item' no matter how I declare it, despite optional parameters working in interface definitions.

  15. #175
    Junior Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    19

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

    Originating thread: https://www.vbforums.com/showthread....=1#post5478421

    Quote Originally Posted by fafalone View Post
    The way the control works is just to enumerate the items and use the system Property Store.
    ... .. .
    Now if you needed the additional information on the individual multi-style fonts (where you'd double click one in the control and then an entry would show up for each), the quickest shortcut would be to check the Folder attribute (siFont.GetAttributes SFGAO_FOLDER, dwAttribs: If (dwAttribs And SFGAO_FOLDER) = SFGAO_FOLDER Then), and then just take siFont and enumerate that in the same way that was done for the font folder...
    siFont.BindToHandler 0&, BHID_EnumItems, IID_IEnumShellItems, pEnum2
    Do While pEnum2.Next(1&, siSubFont, pcl) = S_OK

    etc. ... .. .
    Thanks a ton to your invaluable "extended" guidance (with sample code lines), I was easily able to obtain the multiple styles for fonts which possess the same. Two points of interest in this regard:


    1. For whatever reason, in the primary 'Fonts' folder screen, Windows (I have Windows 10) does not show the individual file names for fonts with multiple styles. This has been raised as an issue too here (in a Microsoft Windows forum). But, thanks to you, now in my program, additionally, I can show the file names for multiple styles too, in a grid which I have created (to show fonts info, in the same way as shown in the 'Fonts' folder).
      Note: Even for fonts without multiple styles, for whatever reason, Windows shows all the file names in uppercase, totally. I am showing the same in my grid now, in the exact case in which the path&file names are existing in the system.
    2. As far as I can see, Windows is showing the 'Size' info cumulatively for fonts with multiple styles. For instance, for Arial, it shows it as 4,240 KB (cumulatively, considering all the nine Arial .ttf fonts). But now, in my program, since I am showing the file name for each of the individual styles, I am able to show the file size too for each of the individual font styles.


    I was able to give the above-mentioned additional info in my grid only because you took the time to give extended guidance on how to recurse through fonts which have multiple font styles. I remain ever in thankfulness to you. Thank you so... much.

    Note: I have been trying to post this message since 24-May-2020 itself (in the originating thread mentioned at the top of this message) but every time I am meeting with errors only - of more than one kind. I am just unable to post. I tried posting through 3 different browsers. So, I am posting this message in this thread itself now, instead of in the thread specified at the very top of this message. Anyway, as such, this is the right thread for me to post this message since I have availed your library only so far and not your ucShellBrowse control. So, hopefully, no issues.

    Prayers and Kind Regards.

  16. #176

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,586

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

    Glad everything is working out, you're welcome

    The control/code here is just pulling data through the same methods that Explorer is; I checked the Fonts folder there and combined sizes and upper case names is how everything is shown in Explorer too, so not too much to be done there besides manually changing it yourself like you're doing.

    As always, I'm happy to help and don't hesitate to post if any issues come up

Page 5 of 5 FirstFirst ... 2345

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