
How to change owner of an object ?
I have a question about that if you don't mind. I'm using VB to create an
ActiveX dll so I can get to the WIN32API. I have a class module with my
functions and they call the Win32 functions which are defined in a standard
module. I may could have just put the Win32 calls in the class module but
for what ever reason I didn't.(I had all my Win32 calls in a .bas file so it
made it easier) Is this the right way to make Win32 calls available to
VBScript? The big one I'm trying to get working is LogonUser which just
won't return the TokenHandle I need for the ImpersonateUser function. I can
get my homemade functions (not using Win32 calls) in the Class Module to
work fine from VBScript and the Win32 calls work fine when I access them
from a test VB project, but it just dies on the VBScript page. I've added
code to test the data types but that doesn't seem to be the problem. The
problem seems to be the critical phToken is ByRef in Win32 and that's giving
me trouble getting that back to VBScript. Any basics on how to get Win32
calls into VBScript would be most appreciated.
Thanks,
John Granade
Quote:
>You can create your own AX control that will access the WIN32API to modify
>and read ACLs
>But this means some work if you're a newbie with C/C++
>Xcacls is well suited for use in a scripting file, but as you say it's not
>always available...
>>Can someone tell me a way to change owner of ,for example, a folder or
file
>>using WSH and VBScript ?
>>I know there is a utility XCACLS.EXE in Windows NT Resource Kit, which can
>>do it easily (O access right), but resource kit is not always available.