CStreams 64bit?

User avatar
rory
5StarLounger
Posts: 818
Joined: 24 Jan 2010, 15:56

Re: CStreams 64bit?

Post by rory »

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.
Regards,
Rory

User avatar
ErikJan
BronzeLounger
Posts: 1256
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: CStreams 64bit?

Post by ErikJan »

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

User avatar
rory
5StarLounger
Posts: 818
Joined: 24 Jan 2010, 15:56

Re: CStreams 64bit?

Post by rory »

I think you missed my point. To get to an LUID type, the structure is:

Code: Select all

TOKEN_PRIVILEGES.Privileges(index).pLUID
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.
Regards,
Rory

User avatar
ErikJan
BronzeLounger
Posts: 1256
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: CStreams 64bit?

Post by ErikJan »

Right. I've been 'experimenting' some more and tried to 'include' your suggestion to end up with this:

Code: Select all

Dim tkp As TOKEN_PRIVILEGES

...

      If LookupPrivilegeValue(vbNullString, SE_BACKUP_NAME, tkp.Privileges(0).pLuid) Then
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...

User avatar
ErikJan
BronzeLounger
Posts: 1256
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: CStreams 64bit?

Post by ErikJan »

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

User avatar
ErikJan
BronzeLounger
Posts: 1256
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: CStreams 64bit?

Post by ErikJan »

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!