I creat it unicode
I know success if it retrn "0",how to do?
anybody can help me!!
Code: Select all
#STATUS_ACCESS_DENIED = $C0000022
#STATUS_INVALID_HANDLE = $C0000008
#STATUS_SUCCESS = $0
#SECTION_MAP_WRITE = $2
#SECTION_MAP_READ = $4
Structure UNICODE_STRING
Length.w
MaximumLength.w
Buffer.l
EndStructure
Structure OBJECT_ATTRIBUTES
Length.l
RootDirectory.l
ObjectName.l
Attributes.l
SecurityDeor.l
SecurityQualityOfService.l
EndStructure
Status.l
Attributes.OBJECT_ATTRIBUTES
PhysmemString.UNICODE_STRING
AdrString.s="\Device\PhysicalMemory"
RtlInitUnicodeString_(@PhysmemString, @adrString)
With Attributes
\Length = SizeOf(Attributes)
\RootDirectory = 0
\ObjectName = @PhysmemString
\Attributes = 0
\SecurityDeor = 0
\SecurityQualityOfService = 0
EndWith
Status = ZwOpenSection_(g_hMPM,#SECTION_MAP_WRITE Or #SECTION_MAP_READ, @Attributes)
Debug "Status="+RSet(Hex(Status),8,"0")
Select Status
Case #STATUS_SUCCESS
Debug "#STATUS_SUCCESS"
Case #STATUS_ACCESS_DENIED
Debug "#STATUS_ACCESS_DENIED"
Case #STATUS_INVALID_HANDLE
Debug "#STATUS_INVALID_HANDLE"
EndSelect
