|
-
Sep 11th, 2000, 01:08 PM
#1
Thread Starter
New Member
Hello all!
I was wondering if anyone had any luck with RegRestoreKey and whether you were able to find all the values for the dwFlags you can pass to it. The allowed values are:
REG_FORCE_RESTORE, REG_NO_LAZY_FLUSH, REG_REFRESH_HIVE, REG_WHOLE_HIVE_VOLATILE.
I've been able to find the long values for the last two, but not for REG_FORCE_RESTORE, REG_NO_LAZY_FLUSH.
Anyone can help me here?
Thanks!!
-
Sep 11th, 2000, 01:23 PM
#2
Fanatic Member
Code:
Private Const REG_NO_LAZY_FLUSH = (&H00000004 )
Private Const REG_FORCE_RESTORE = (&H00000008 )
I got these as part of a more complete API programm from http://www.AllApi.com (the app is called 'API Toolshed')
I hope this helps,
Me.
-
Sep 11th, 2000, 01:45 PM
#3
Thread Starter
New Member
Set a security privilege with code
it did help, thanks 
it just brought another problem. I need to have the SE_RESTORE_NAME privilege to do that.
Can a privilege be set by code???
-
Sep 11th, 2000, 02:05 PM
#4
Fanatic Member
I don't know, but ... opens ToolShed ...
Code:
Private Const SE_RESTORE_NAME = "SeRestorePrivilege"
I don't know if you could use this site somehow.
-
Sep 11th, 2000, 02:32 PM
#5
Thread Starter
New Member
Yes, I have been researching the issue, but it seems that in order to be able to change security permission, or "priviliges", you need permission to be able to change a permission.
How about that?
Any ideas anyone?
-
Sep 13th, 2000, 01:11 PM
#6
Fanatic Member
I think you need to use AdjustTokenPriviliges:
Code:
Public Declare Function AdjustTokenPrivileges Lib "advapi32.dll" (ByVal TokenHandle As Long, ByVal DisableAllPrivileges As Long, NewState As TOKEN_PRIVILEGES, ByVal BufferLength As Long, PreviousState As TOKEN_PRIVILEGES, ReturnLength As Long) As Long
Public Type LUID_AND_ATTRIBUTES
pLuid As LUID
Attributes As Long
End Type
Public Type LUID
LowPart As Long
HighPart As Long
End Type
Public Type TOKEN_PRIVILEGES
PrivilegeCount As Long
Privileges(ANYSIZE_ARRAY) As LUID_AND_ATTRIBUTES
End Type
I think that to know how to use this, you should check this:
Hyah
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|