Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38

Thread: TestsExplorerWSO

  1. #31
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,429
    Rep Power
    10
    This is post
    https://www.excelfox.com/forum/showt...ll=1#post23969
    https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23971&viewfull=1#post23969
    https://www.excelfox.com/forum/showt...age4#post23969
    https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post23969





    Some extra notes for this forum post
    https://eileenslounge.com/viewtopic....313961#p313961 https://eileenslounge.com/viewtopic....313971#p313971

    Quote Originally Posted by SpeakEasy
    https://eileenslounge.com/viewtopic....313961#p313961
    >How? By uising the (hidden) ExtendedProperty property ...
    … these do not match (generally) the GetDetailsOf property names. So if you want the full list you'll need to get hold of propkey.h, a header file in the Windows SDK. That file currently lists over 1000 extended properties (although many are not related to files or folders)
    Microsoft Windows SDK
    This is one of those Microsoft things that no one understands because it is too vague and open to interpretation and later change to whatever it ever was, but people who used something that may be somehow or was at some time part of whatever it is, or may have been at any time, will use words as if they know what it is, even though that is impossible. It might be just about possible to say it has things, such as important lists not so typically available or talked about information but that might be necessary for a software developer to make something using Microsoft stuff that might be to the benefit of Microsoft. So a sort of physiological trick to make useful information available to some people in a careful selective way: Microsoft don’t want people to get useful things of theirs working consistently too well. It’s partly useful background long time reliable windows stuff that Microsoft might use themselves but then try to wrap in a way that they can more easily control and sabotage later. It has some similar stuff and ideas to the equally mysterious .Net

    [Joke]I think Mike (SpeakEasy) is a fifth columnist working for Microsoft, feeding us some secrets to gain our trust, then he will drop something on us that will trash all or computers forcing us all to get windows 12 which will just be a wrapper for an artificial intelligence that will take over and control us as its servants.[/joke]

    Anyway, I found after downloading this , in it somewhere after downloading it, whatever it is, this file here
    here: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\propkey.h
    https://i.postimg.cc/xdVmfPYz/C-Prog...-propkey-h.jpg
    C Program Files (x86) Windows Kits 10 Include 10 0 22621 0 um propkey h.JPG

    That appears to be something of as text file,
    https://i.postimg.cc/6q9QGDf2/propkey-h-Properties.jpg
    propkey h Properties.JPG

    , which I opened with a text editor and saved as a text file
    propkey h.txt https://app.box.com/s/q8klctlcfka8s1uecklbf15n75cxc3v2





    Took a look at the text file, https://www.excelfox.com/forum/showt...V-stuff/page12
    https://www.excelfox.com/forum/showt...ll=1#post23981 https://www.excelfox.com/forum/showt...ll=1#post23979

    The TLDR
    It’s nicely ordered in text sections like this
    Code:
    //  Name:     System.Size -- PKEY_Size
    //  Type:     UInt64 -- VT_UI8
    //  FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE)
    //
    //  
    DEFINE_PROPERTYKEY(PKEY_Size, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 12);
    #define INIT_PKEY_Size { { 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC }, 12 }
    Did a macro , Sub ExtendedPropertiesList(), it…
    _ REM 1 gets the text file as a long string
    _ '1b splits the text up using something that appears to be used once for every property ,
    // Name: System.
    _ Rem 2 The macro then puts that array of text(string) elements as a simple list in the first column of an Excel file https://i.postimg.cc/QMtxzmJ8/Excel-...Proph-Keys.jpg , https://postimg.cc/sMkrQpLq/1ed786fd

    ( I remove wrap text with the macro , so as to make the list and those derived from part of the data a bit more manageable. That way I can reduce the column width and when I put anything in the next column, I don’t easily see all the text, but it is there if I need it. I am mainly interested in having the data somewhere for now.)
    ( _ Rem 3
    I took look in detail at the exact characters in a few of those sections. There were no great surprises in terms of strange characters. https://www.excelfox.com/forum/showt...ll=1#post23981 )
    _ Rem 4
    This demonstrates why in this case a list in an Excel column can be useful, (which I might more usually avoid for performance reasons such as spreadsheet interactions being relatively slow, and simple text file alternative list would be easier to store, share etc.). The Evaluate Range very efficiently picks out the important name part of the propherkeys, for example in the above section example, that would be Size. Here is a full development of that Evaluate range solution, https://www.excelfox.com/forum/showt...ll=1#post23983
    WSO_PropNamesExtended.xls https://app.box.com/s/sv5rxxtwv1v18ir3xmi6gdti8pawx0jq


    Code:
    '   https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23979&viewfull=1#post23979     https://www.excelfox.com/forum/showthread.php/2909-Appendix-Thread-Evaluate-Range-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23983&viewfull=1#post23983
    Sub ExtendedPropertiesList()
    ' Rem 1 Get the text file as a long single string
    Dim FileNum As Long: Let FileNum = FreeFile(1)                                    ' https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/freefile-function
    Dim PathAndFileName As String, TotalFile As String
     Let PathAndFileName = ThisWorkbook.Path & Application.PathSeparator & "propkey h.txt"   '
    Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundamental type data input...
    ' Let TotalFile = Space(LOF(FileNum)) '....and wot receives it has to be a string of exactly the right length
    'Get #FileNum, , TotalFile
    '  Or  http://www.eileenslounge.com/viewtopic.php?p=295782&sid=f6dcab07c4d24e00e697fe4343dc7392#p295782
     Let TotalFile = Input(LOF(FileNum), FileNum)
    Close #FileNum
    ' 1b Split the Prophs
    Dim arrProphs() As String: Let arrProphs() = Split(TotalFile, "//  Name:     System.", -1, vbBinaryCompare)
    ' Rem 2 Quick look at list
    Dim LCnt As Long: Let LCnt = UBound(arrProphs())
    Dim Rws() As Variant, Clms() As Variant, VertList() As Variant
     Let Rws() = Evaluate("ROW(1:" & LCnt + 1 & ")/ROW(1:" & LCnt + 1 & ")")
     Let Clms() = Evaluate("ROW(1:" & LCnt + 1 & ")")
     Let VertList() = Application.Index(arrProphs(), Rws(), Clms())
     Let Me.Range("A1:A" & LCnt & "") = VertList()
    Me.Cells.WrapText = False
    Rem 4
    '' 2b) Look at some example props   using function    WtchaGot_Unic_NotMuchIfYaChoppedItOff
    ''     The next text is copied from cell A 350
    ''       "Size -- PKEY_Size
    ''    //  Type:     UInt64 -- VT_UI8
    ''    //  FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE)
    ''    //
    ''    //
    ''    DEFINE_PROPERTYKEY(PKEY_Size, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 12);
    ''    #define INIT_PKEY_Size { { 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC }, 12 }
    ''
    ''    "
    ''    The next text is copied from watch window at  arrProphs()(349)
    ''        : arrProphs()(349) : "Size -- PKEY_Size
    ''    //  Type:     UInt64 -- VT_UI8
    ''    //  FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE)
    ''    //
    ''    //
    ''    DEFINE_PROPERTYKEY(PKE"
    Rem 3
    ' Call WtchaGot_Unic_NotMuchIfYaChoppedItOff(arrProphs()(349), "Size349")
    
    Rem 4 Evaluate Range to get just the property to use in like    .ExtendedProperty("System.Size")
    Dim arrExtProps() As Variant   '
     Let arrExtProps() = Me.Evaluate("IF({1},LEFT(A2:A1055,SEARCH("" -- PKEY"",A2:A1055)-1))")
    ' 3b) Paste into a worksheet column
     Let Me.Range("E2:E1055") = arrExtProps()
    'Stop
    End Sub

    A simple coding puts that second column of propherkeys in a text file
    https://www.excelfox.com/forum/showt...ll=1#post23981


    Conclusions
    So from the initial Investigations, It appears that we have 1054 of these things.
    In the next posts we review and look in more detail
    Last edited by DocAElstein; 02-26-2024 at 07:54 PM.

  2. #32
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,429
    Rep Power
    10
    later
    Last edited by DocAElstein; 02-04-2024 at 12:34 PM.

  3. #33
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,429
    Rep Power
    10
    This is post
    https://www.excelfox.com/forum/showt...ll=1#post23971
    https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23971&viewfull=1#post23971
    https://www.excelfox.com/forum/showt...age4#post23971
    https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post23971









    Some extra notes for this forum post
    https://eileenslounge.com/viewtopic....313971#p313971



    Code:
    Sub TestExtendedThingLateBinding() ' https://eileenslounge.com/viewtopic.php?p=313961#p313961
    
    Dim objWSO As Object                        ' Late Binding                                                               '    https://i.postimg.cc/Fz9zrnNm/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg     https://i.postimg.cc/sDC9S54h/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg
     Set objWSO = CreateObject("shell.application")
    Dim objWSOFolder As Object: Set objWSOFolder = objWSO.Namespace((ThisWorkbook.Path & ""))     '  ((   & ""  ))           ' https://stackoverflow.com/questions/33868233/shell-namespace-not-accepting-string-variable-but-accepting-string-itself/77888851#77888851     https://microsoft.public.access.narkive.com/Jl55mts5/problem-using-shell-namespace-method-in-vba#post5
    Dim objWSOPassName As Object
    ' Test File
     Set objWSOPassName = objWSOFolder.ParseName("sample.wmv")  ' file
    Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size")          ' Accurate size: 643170
    Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified")  ' Date Modified: 19.11.2002 09:41:48
    Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated")    ' Date Created: 18.01.2024 17:19:04
    Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay")  ' Path: F:\MMPropertyTest
    Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay")        ' Name: sample.wmv
    Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText")           ' Type: WMV-Datei
    Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion")         ' Version:
    Debug.Print
    
    ' Test Folder
    Set objWSOPassName = objWSOFolder.ParseName("Movie Maker") ' Folder
    Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size")          ' Accurate size:
    Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified")  ' Date Modified: 05.12.2023 14:30:42
    Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated")    ' Date Created: 04.02.2024 06:27:24
    Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay")  ' Path: F:\MMPropertyTest
    Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay")        ' Name: Movie Maker
    Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText")           ' Type: Dateiordner
    Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion")         ' Version:
    Debug.Print
    
    ' Test File
    Set objWSOPassName = objWSOFolder.ParseName("moviemk.exe") ' File
    Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size")          ' Accurate size: 3366912
    Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified")  ' Date Modified: 20.12.2002 12:06:00
    Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated")    ' Date Created: 04.02.2024 06:28:00
    Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay")  ' Path: F:\MMPropertyTest
    Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay")        ' Name: moviemk.exe
    Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText")           ' Type: Anwendung
    Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion")         ' Version: 2.0.3312.0
    Debug.Print
    End Sub
    ' https://www.eileenslounge.com/viewtopic.php?p=313975#p313975
    Sub TestExtendedThingLateBindingEarlyBinding()    '     https://eileenslounge.com/viewtopic.php?style=28&p=313975#p313975
    Dim objWSO As Shell32.Shell                 ' Early Binding
      Set objWSO = New Shell32.Shell              '    https://i.postimg.cc/Fz9zrnNm/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg     https://i.postimg.cc/sDC9S54h/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg
    Dim Parf As String:  Let Parf = ThisWorkbook.Path
    Dim objWSOFolder As Shell32.Folder: Set objWSOFolder = objWSO.Namespace(Parf)
    Dim objWSOPassName As Shell32.FolderItem
    ' Test File
     Set objWSOPassName = objWSOFolder.ParseName("sample.wmv")  ' file
    Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size")          ' Accurate size: 643170
    Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified")  ' Date Modified: 19.11.2002 09:41:48
    Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated")    ' Date Created: 18.01.2024 17:19:04
    Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay")  ' Path: F:\MMPropertyTest
    Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay")        ' Name: sample.wmv
    Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText")           ' Type: WMV-Datei
    Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion")         ' Version:
    Debug.Print
    
    ' Test Folder
    Set objWSOPassName = objWSOFolder.ParseName("Movie Maker") ' Folder
    Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size")          ' Accurate size:
    Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified")  ' Date Modified: 05.12.2023 14:30:42
    Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated")    ' Date Created: 04.02.2024 06:27:24
    Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay")  ' Path: F:\MMPropertyTest
    Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay")        ' Name: Movie Maker
    Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText")           ' Type: Dateiordner
    Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion")         ' Version:
    Debug.Print
    
    ' Test File
    Set objWSOPassName = objWSOFolder.ParseName("moviemk.exe") ' File
    Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size")          ' Accurate size: 3366912
    Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified")  ' Date Modified: 20.12.2002 12:06:00
    Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated")    ' Date Created: 04.02.2024 06:28:00
    Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay")  ' Path: F:\MMPropertyTest
    Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay")        ' Name: moviemk.exe
    Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText")           ' Type: Anwendung
    Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion")         ' Version: 2.0.3312.0
    Debug.Print
    End Sub
    

    https://i.postimg.cc/13v6G95B/Ext-Prop-Samples.jpg
    ExtPropSamples.JPG

    From here: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\propkey.h
    https://i.postimg.cc/xdVmfPYz/C-Prog...-propkey-h.jpg
    C Program Files (x86) Windows Kits 10 Include 10 0 22621 0 um propkey h.JPG


    https://i.postimg.cc/bvbCYCh1/propkey-h.jpg
    propkey h.jpg

    MMPropertyTest https://app.box.com/s/27u7dyjee3rez44pdjq52uu2e7tgzu8v

    Movie Maker https://app.box.com/s/u26nnuiyz6qyh727e50jsn6dsiyvbmo7
    WSO_PropNamesExtended.xls https://app.box.com/s/chq5dk19k67ihlrgirtyev3vsz5c6syc
    sample.wmv https://app.box.com/s/k77i9o7eb8ymcvjw1oz39gmdkvuyfieq
    propkey h.txt https://app.box.com/s/q8klctlcfka8s1uecklbf15n75cxc3v2
    moviemk.exe https://app.box.com/s/f14uc74w8kxmphfn94hjp2k9ygodob97





    winsdksetup.exe https://app.box.com/s/4jb97wnawj8ocktkx9209w8gsefp7wnk
    Attached Files Attached Files
    Last edited by DocAElstein; 02-05-2024 at 01:13 AM.

  4. #34
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,429
    Rep Power
    10
    This is post
    https://www.excelfox.com/forum/showt...ull=#post23972
    https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23971&viewfull=1#post23972
    https://www.excelfox.com/forum/showt...age4#post23972
    https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post239729





    Some extra notes for this forum post
    https://eileenslounge.com/viewtopic....313961#p313961 https://eileenslounge.com/viewtopic....313971#p313971

    Quote Originally Posted by SpeakEasy
    https://eileenslounge.com/viewtopic....313961#p313961
    >How? By uising the (hidden) ExtendedProperty property ...
    … these do not match (generally) the GetDetailsOf property names. So if you want the full list you'll need to get hold of propkey.h, a header file in the Windows SDK. That file currently lists over 1000 extended properties (although many are not related to files or folders)
    Microsoft Windows SDK
    This is one of those Microsoft things that no one understands because it is too vague and open to interpretation and later change to whatever it ever was, but people who used something that may be somehow or was at some time part of whatever it is, or may have been at any time, will use words as if they know what it is, even though that is impossible. It might be just about possible to say it has things, such as important lists not so typically available or talked about information but that might be necessary for a software developer to make something using Microsoft stuff that might be to the benefit of Microsoft. So a sort of physiological trick to make useful information available to some people in a careful selective way: Microsoft don’t want people to get useful things of theirs working consistently too well. It’s partly useful background long time reliable windows stuff that Microsoft might use themselves but then try to wrap in a way that they can more easily control and sabotage later. It has some similar stuff and ideas to the equally mysterious .Net

    [Joke]I think Mike (SpeakEasy) is a fifth columnist working for Microsoft, feeding us some secrets to gain our trust, then he will drop something on us that will trash all or computers forcing us all to get windows 12 which will just be a wrapper for an artificial intelligence that will take over and control us as its servants.[/joke]

    Anyway, I found after downloading this , in it somewhere after downloading it, whatever it is, this file here
    here: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\propkey.h
    https://i.postimg.cc/xdVmfPYz/C-Prog...-propkey-h.jpg
    C Program Files (x86) Windows Kits 10 Include 10 0 22621 0 um propkey h.JPG

    That appears to be something of as text file,
    https://i.postimg.cc/6q9QGDf2/propkey-h-Properties.jpg
    propkey h Properties.JPG

    , which I opened with a text editor and saved as a text file
    propkey h.txt https://app.box.com/s/q8klctlcfka8s1uecklbf15n75cxc3v2





    Took a look at the text file, https://www.excelfox.com/forum/showt...V-stuff/page12
    https://www.excelfox.com/forum/showt...ll=1#post23981 https://www.excelfox.com/forum/showt...ll=1#post23979

    The TLDR
    It’s nicely ordered in text sections like this
    Code:
    //  Name:     System.Size -- PKEY_Size
    //  Type:     UInt64 -- VT_UI8
    //  FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE)
    //
    //  
    DEFINE_PROPERTYKEY(PKEY_Size, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 12);
    #define INIT_PKEY_Size { { 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC }, 12 }
    Did a macro , Sub ExtendedPropertiesList(), it…
    _ REM 1 gets the text file as a long string
    _ '1b splits the text up using something that appears to be used once for every property ,
    // Name: System.
    _ Rem 2 The macro then puts that array of text(string) elements as a simple list in the first column of an Excel file https://i.postimg.cc/QMtxzmJ8/Excel-...Proph-Keys.jpg , https://postimg.cc/sMkrQpLq/1ed786fd

    ( I remove wrap text with the macro , so as to make the list and those derived from part of the data a bit more manageable. That way I can reduce the column width and when I put anything in the next column, I don’t easily see all the text, but it is there if I need it. I am mainly interested in having the data somewhere for now.)
    ( _ Rem 3
    I took look in detail at the exact characters in a few of those sections. There were no great surprises in terms of strange characters. https://www.excelfox.com/forum/showt...ll=1#post23981 )
    _ Rem 4
    This demonstrates why in this case a list in an Excel column can be useful, (which I might more usually avoid for performance reasons such as spreadsheet interactions being relatively slow, and simple text file alternative list would be easier to store, share etc.). The Evaluate Range very efficiently picks out the important name part of the propherkeys, for example in the above section example, that would be Size. Here is a full development of that Evaluate range solution, https://www.excelfox.com/forum/showt...ll=1#post23983
    WSO_PropNamesExtended.xls https://app.box.com/s/sv5rxxtwv1v18ir3xmi6gdti8pawx0jq


    Code:
    '   https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23979&viewfull=1#post23979     https://www.excelfox.com/forum/showthread.php/2909-Appendix-Thread-Evaluate-Range-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23983&viewfull=1#post23983
    Sub ExtendedPropertiesList()
    ' Rem 1 Get the text file as a long single string
    Dim FileNum As Long: Let FileNum = FreeFile(1)                                    ' https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/freefile-function
    Dim PathAndFileName As String, TotalFile As String
     Let PathAndFileName = ThisWorkbook.Path & Application.PathSeparator & "propkey h.txt"   '
    Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundamental type data input...
    ' Let TotalFile = Space(LOF(FileNum)) '....and wot receives it has to be a string of exactly the right length
    'Get #FileNum, , TotalFile
    '  Or  http://www.eileenslounge.com/viewtopic.php?p=295782&sid=f6dcab07c4d24e00e697fe4343dc7392#p295782
     Let TotalFile = Input(LOF(FileNum), FileNum)
    Close #FileNum
    ' 1b Split the Prophs
    Dim arrProphs() As String: Let arrProphs() = Split(TotalFile, "//  Name:     System.", -1, vbBinaryCompare)
    ' Rem 2 Quick look at list
    Dim LCnt As Long: Let LCnt = UBound(arrProphs())
    Dim Rws() As Variant, Clms() As Variant, VertList() As Variant
     Let Rws() = Evaluate("ROW(1:" & LCnt + 1 & ")/ROW(1:" & LCnt + 1 & ")")
     Let Clms() = Evaluate("ROW(1:" & LCnt + 1 & ")")
     Let VertList() = Application.Index(arrProphs(), Rws(), Clms())
     Let Me.Range("A1:A" & LCnt & "") = VertList()
    Me.Cells.WrapText = False
    Rem 4
    '' 2b) Look at some example props   using function    WtchaGot_Unic_NotMuchIfYaChoppedItOff
    ''     The next text is copied from cell A 350
    ''       "Size -- PKEY_Size
    ''    //  Type:     UInt64 -- VT_UI8
    ''    //  FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE)
    ''    //
    ''    //
    ''    DEFINE_PROPERTYKEY(PKEY_Size, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 12);
    ''    #define INIT_PKEY_Size { { 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC }, 12 }
    ''
    ''    "
    ''    The next text is copied from watch window at  arrProphs()(349)
    ''        : arrProphs()(349) : "Size -- PKEY_Size
    ''    //  Type:     UInt64 -- VT_UI8
    ''    //  FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE)
    ''    //
    ''    //
    ''    DEFINE_PROPERTYKEY(PKE"
    Rem 3
    ' Call WtchaGot_Unic_NotMuchIfYaChoppedItOff(arrProphs()(349), "Size349")
    
    Rem 4 Evaluate Range to get just the property to use in like    .ExtendedProperty("System.Size")
    Dim arrExtProps() As Variant   '
     Let arrExtProps() = Me.Evaluate("IF({1},LEFT(A2:A1055,SEARCH("" -- PKEY"",A2:A1055)-1))")
    ' 3b) Paste into a worksheet column
     Let Me.Range("E2:E1055") = arrExtProps()
    'Stop
    End Sub

    A simple coding puts that second column of propherkeys in a text file
    https://www.excelfox.com/forum/showt...ll=1#post23981


    Conclusions
    So from the initial Investigations, It appears that we have 1054 of these things.
    In the next posts we review and look in more detail
    Last edited by DocAElstein; 02-26-2024 at 08:05 PM.

  5. #35
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,429
    Rep Power
    10
    This is post
    https://www.excelfox.com/forum/showt...rerWSO?p=23973 &viewfull=1#post23973
    https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23972&viewfull=1#post23973
    https://www.excelfox.com/forum/showt...lorerWSO/page4
    https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post23973



    Extended PropherKeys
    So it’s time to look at these in detail….
    Review
    Takes some file or folder, example, sample.wmv https://app.box.com/s/leu06ql1fu9uzt59wnoizedg85qoo7k4 , put it in the same folder as the file that contains this coding. Run the coding.
    Code:
    Sub QuickReviewWSOPropherKeys()   '     https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23973&viewfull=1#post23973
    Dim WSOobjWSO As Shell32.Shell     '    Early Binding
     Set WSOobjWSO = New Shell32.Shell    ' https://i.postimg.cc/Fz9zrnNm/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg  https://i.postimg.cc/sDC9S54h/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg
    Dim WSOobjWSOFolder As Shell32.Folder: Set WSOobjWSOFolder = WSOobjWSO.Namespace(ThisWorkbook.Path)
    Dim WSOobjWSOPassName As Shell32.FolderItem: Set WSOobjWSOPassName = WSOobjWSOFolder.ParseName("sample.wmv")
    Debug.Print WSOobjWSOPassName.ExtendedProperty("System." & "Size"): MsgBox prompt:=WSOobjWSOPassName.ExtendedProperty("System." & "Size"), Title:="sample.wmv  Size  Propherkey" '   643170
    Debug.Print
    Dim objWSO As Object      '  Late Binding
     Set objWSO = CreateObject("shell.application")    '
    Dim objWSOFolder As Object: Set objWSOFolder = objWSO.Namespace((ThisWorkbook.Path & ""))     '  ((   & ""  ))           ' https://stackoverflow.com/questions/33868233/shell-namespace-not-accepting-string-variable-but-accepting-string-itself/77888851#77888851     https://microsoft.public.access.narkive.com/Jl55mts5/problem-using-shell-namespace-method-in-vba#post5
    Dim objWSOPassName As Object: Set objWSOPassName = objWSOFolder.ParseName("sample.wmv")
    Debug.Print objWSOPassName.ExtendedProperty("System." & "Size"): MsgBox prompt:=objWSOPassName.ExtendedProperty("System." & "Size"), Title:="sample.wmv  Size  Propherkey"       '   643170
    Debug.Print
    End Sub
    
    That should tell you that the size of the file, sample.wmv is 643170
    Last edited by DocAElstein; 03-04-2024 at 02:49 AM.

  6. #36
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,429
    Rep Power
    10
    later
    Last edited by DocAElstein; 02-04-2024 at 12:34 PM.

  7. #37
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,429
    Rep Power
    10
    lateer
    Last edited by DocAElstein; 02-04-2024 at 12:35 PM.

  8. #38
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,429
    Rep Power
    10
    later
    Last edited by DocAElstein; 02-04-2024 at 12:35 PM.

Posting Permissions

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