For some reason, the forum wouldn't let me post the reply I'd set up, so I will try again piecemeal:
tkp is a TOKEN_PRIVILEGES type.
That type does not have a LUID member.
CStreams 64bit?
-
- BronzeLounger
- Posts: 1256
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
Re: CStreams 64bit?
Rory,
But as I wrote:
"The latter is defined with two variables: "PrivilegeCount As Long" and "Privileges(ANYSIZE_ARRAY) As LUID_AND_ATTRIBUTES"
"LUID_AND_ATTRIBUTES" defines two variables "pLuid As LUID" and "Attributes As Long"
"LUID" also defines two variables: "LowPart As Long" and "HighPart As Long"
So LUID is required it seems...
But as I wrote:
"The latter is defined with two variables: "PrivilegeCount As Long" and "Privileges(ANYSIZE_ARRAY) As LUID_AND_ATTRIBUTES"
"LUID_AND_ATTRIBUTES" defines two variables "pLuid As LUID" and "Attributes As Long"
"LUID" also defines two variables: "LowPart As Long" and "HighPart As Long"
So LUID is required it seems...
-
- 5StarLounger
- Posts: 818
- Joined: 24 Jan 2010, 15:56
Re: CStreams 64bit?
I think you missed my point. To get to an LUID type, the structure is:
You used tkp.LUID which just doesn't make sense, since it missed out the Privileges part and the accessor is pLUID not LUID, which is the type.
Code: Select all
TOKEN_PRIVILEGES.Privileges(index).pLUID
Regards,
Rory
Rory
-
- BronzeLounger
- Posts: 1256
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
Re: CStreams 64bit?
Right. I've been 'experimenting' some more and tried to 'include' your suggestion to end up with this:
For ".pLUID" I now get a "ByRef argument type mismatch" error. Also I chose the index to be zero here but I have no idea why.
My hope is fading (despite your great help and patience) as I don't know what the next error will be after we 'fixed' this one.
PS. Obviously I can make my test code available if someone would be interested, but it's merely an attempt to convert the existing (working) 32-bit code I got off the Internet (and used before). Not sure if I messed up already of course...
Code: Select all
Dim tkp As TOKEN_PRIVILEGES
...
If LookupPrivilegeValue(vbNullString, SE_BACKUP_NAME, tkp.Privileges(0).pLuid) Then
My hope is fading (despite your great help and patience) as I don't know what the next error will be after we 'fixed' this one.
PS. Obviously I can make my test code available if someone would be interested, but it's merely an attempt to convert the existing (working) 32-bit code I got off the Internet (and used before). Not sure if I messed up already of course...
-
- BronzeLounger
- Posts: 1256
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
Re: CStreams 64bit?
Wild guess... could I use Streams.Exe (SysInternals) to process all files and then catch the output in a file and then pick up that file in VBA?
(similar to a thought I just had for another question).
The problem would be that where this could maybe flag files with stream info, in a later step, the tool that I'm updating also allows to selectively delete some stream info (like "File loaded from the Internet" and "Dropbox") while keeping other ADS info...
(similar to a thought I just had for another question).
The problem would be that where this could maybe flag files with stream info, in a later step, the tool that I'm updating also allows to selectively delete some stream info (like "File loaded from the Internet" and "Dropbox") while keeping other ADS info...
-
- BronzeLounger
- Posts: 1256
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
Re: CStreams 64bit?
This is to let you know that someone "fafalone" in the "vbforums"-forum helped me out very quickly and converted the original CStreams 32bit code in code that also runs in a 64 bit environment!