This is post 111, Page 12 from this Thread we are in https://www.excelfox.com/forum/showt...-VBA-CSV-stuff
https://www.excelfox.com/forum/showt...ll=1#post23979
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/showt...V-stuff/page12
https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff/page12
In support of these forum posts
https://www.excelfox.com/forum/showt...ll=1#post23969
https://eileenslounge.com/viewtopic....313975#p313975
Now here’s a thing….
Originally Posted by
SpeakEasy
uising the (hidden) ExtendedProperty property ...
.....need to get hold of [fx]propkey.h[/fx], a header file in the Windows SDK. That file currently lists over 1000 extended properties (although many are not related to files or folders)
https://eileenslounge.com/viewtopic....313961#p313961
After a bit of initial looking into this,
https://www.excelfox.com/forum/showt...ll=1#post23971
https://www.excelfox.com/forum/showt...ll=1#post23969
https://eileenslounge.com/viewtopic....313971#p313971
MMPropertyTest https://app.box.com/s/27u7dyjee3rez44pdjq52uu2e7tgzu8v
https://eileenslounge.com/viewtopic....314037#p314037
propkey h.txt https://app.box.com/s/q8klctlcfka8s1uecklbf15n75cxc3v2
, the TLDR is that I got a text file, propkey h.txt , with useful things in it. I want to get a more simpler list of stuff from that. This Thread is the place to do that,
propkey h.txt What does it look like
It look nice and well ordered, - do a search for example on a size property, and we see it as part of an already quite well structured list
https://i.postimg.cc/bvbCYCh1/propkey-h.jpg
Attachment 5748
This is that text, as seen on the picture above, in the text file,
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 }
With a typical macro like this un, we can take a look at that. (We are basically splitting the text up using something that appears to be used once for every property ,
// Name: System.
)
Code:
Option Explicit
' 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
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
' Rem 2 Split the Prophs
Dim arrProphs() As String: Let arrProphs() = Split(TotalFile, "// Name: System.", -1, vbBinaryCompare)
' 2a) 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
' 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"
Call WtchaGot_Unic_NotMuchIfYaChoppedItOff(arrProphs()(349), "Size349")
Stop
End Sub
That macro and the function , WtchaGot_Unic_NotMuchIfYaChoppedItOff( , in the uploaded file
Some results and discussions in next post
Bookmarks