![]() |
#2
风吹过b2015-12-27 16:43
|

Private Function MyNtCreateMutant(ByVal MutantHandle As Long, ByVal DesiredAccess As Long, ObjectAttributes As POBJECT_ATTRIBUTES, ByVal InitialOwner As Long) As Long
Dim Ret As Long
Dim strObjectName As String
Dim strUnicode As UNICODE_STRING
'MsgBox ObjectAttributes.ObjectName.Buffer
'RtlInitUnicodeString strUnicode, StrPtr(strObjectName) '初始化Unicode字符串
'MsgBox GetStr(ObjectAttributes.ObjectName)
RtlInitUnicodeString VarPtr(strUnicode), StrPtr(strObjectName)
ObjectAttributes.ObjectName = VarPtr(strUnicode)
'MsgBox strObjectName
‘这里怎么转换出ObjectAttributes 中的UNICODE_STRING字符串呢?头要炸了
UnHookNtCreateMutant
MyNtCreateMutant = NtCreateMutant(MutantHandle, DesiredAccess, ObjectAttributes, InitialOwner)
MsgBox strObjectName
HookNtCreateMutant
End Function
Dim Ret As Long
Dim strObjectName As String
Dim strUnicode As UNICODE_STRING
'MsgBox ObjectAttributes.ObjectName.Buffer
'RtlInitUnicodeString strUnicode, StrPtr(strObjectName) '初始化Unicode字符串
'MsgBox GetStr(ObjectAttributes.ObjectName)
RtlInitUnicodeString VarPtr(strUnicode), StrPtr(strObjectName)
ObjectAttributes.ObjectName = VarPtr(strUnicode)
'MsgBox strObjectName
‘这里怎么转换出ObjectAttributes 中的UNICODE_STRING字符串呢?头要炸了
UnHookNtCreateMutant
MyNtCreateMutant = NtCreateMutant(MutantHandle, DesiredAccess, ObjectAttributes, InitialOwner)
MsgBox strObjectName
HookNtCreateMutant
End Function
[此贴子已经被作者于2015-12-27 12:53编辑过]