切换到宽版
  • 5132阅读
  • 28回复

啊啊啊啊!!我会写程序了…… [复制链接]

上一主题 下一主题
离线Ntoskrnl

只看该作者 10楼 发表于: 2008-10-05
嗯再来一段
Public Sub LstAutosize(ByVal Lst As ListView)
Dim i&
For i = 0 To Lst.ColumnHeaders.Count - 1
Call SendMessage(Lst.hWnd, &H101E, i, ByVal -2&)
Next
End Sub
离线93°

只看该作者 11楼 发表于: 2008-10-05
= = ……其实我要拿东西米啥用
Intel Xeon 5405  
Microsoft Windows 7 Ultimate 64Bit
Microsoft Windows Vista Ultimate 64Bit
Microsoft Windows Server 2003
Microsoft Windows XP Pro
nVIDIA GeForce 9600 + 1GB DDR2 800Mhz x4
离线Ntoskrnl

只看该作者 12楼 发表于: 2008-10-05
流血不止嗯
Public Function GET_OS() As String
On Error GoTo IsSupportedOS_Err_Hdl

VerInfo.dwOSVersionInfoSize = Len(VerInfo)

If (GetVersionEx(VerInfo)) <> 0 Then
If VerInfo.dwPlatformId = 2 Then
If VerInfo.dwMajorVersion = 5 Then

Select Case VerInfo.dwMinorVersion
Case 0
GET_OS = "2k"
Case 1
GET_OS = "xp"
Case 2
GET_OS = "2k3"
End Select
ElseIf VerInfo.dwMajorVersion = 6 Then
GET_OS = "vista"
End If

End If
End If
IsSupportedOS_Err_Hdl:

End Function
离线93°

只看该作者 13楼 发表于: 2008-10-05
那我放这个…….NET的
Public Sub testsub()
Dim onetest As New test
Dim onethead As System.Threading.Thread

onetest.one = 1
onethead = New System.Threading.Thread(AddressOf onetest.process)
onethead.Start()
End Sub
Public Class test
Private mintone As Integer

Public Property one() As Integer
Get
Return mintone
End Get
Set(ByVal Value As Integer)
If IsNumeric(Value) Then
mintone = Value
End If
End Set
End Property

Public Sub process()
mintone += 1
Debug.WriteLine(mintone)
End Sub
End Class
Intel Xeon 5405  
Microsoft Windows 7 Ultimate 64Bit
Microsoft Windows Vista Ultimate 64Bit
Microsoft Windows Server 2003
Microsoft Windows XP Pro
nVIDIA GeForce 9600 + 1GB DDR2 800Mhz x4
离线Ntoskrnl

只看该作者 14楼 发表于: 2008-10-05
欢迎放血
Private Function GetWorkSize(hPid As Long) As Long
Dim Pmc As PROCESS_MEMORY_COUNTERS
Dim lRet As Long
Dim hProcess As Long

hProcess = MyOpenProcess(PROCESS_QUERY_INFORMATION Or PROCESS_VM_READ, hPid)


Pmc.cb = LenB(Pmc)

lRet = GetProcessMemoryInfo(hProcess, Pmc, Pmc.cb)

GetWorkSize = Pmc.WorkingSetSize \ 1024

ZwClose hProcess
End Function
离线Ntoskrnl

只看该作者 15楼 发表于: 2008-10-05
文件防删占坑大法
Private Const GENERIC_READ = &H80000000

Private Const OPEN_EXISTING = 3

Private Const FILE_ATTRIBUTE_NORMAL = &H80

Dim FileHandle As Long

Dim sa As SECURITY_ATTRIBUTES

dim FilePath as String

FilePath="C:\test.txt"

FileHandle = CreateFile(FilePath, _
GENERIC_READ, _
0&, _
sa, _
OPEN_EXISTING, _
FILE_ATTRIBUTE_NORMAL, _
0&)

恢复方法 CloseHandle( FileHandle);
离线Ntoskrnl

只看该作者 16楼 发表于: 2008-10-05
积极放血
Private Declare Function ZwAdjustPrivilegesToken Lib "ntdll" (ByVal TokenHandle As Long, ByVal DisableAllPrivileges As Long, ByVal pNewPrivilegeSet As Long, ByVal BufferLength As Long, ByVal pPreviousState As Long, ByVal pReturnLength As Long) As Long

Private Declare Function ZwOpenProcessToken Lib "ntdll" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, ByVal pTokenHandle As Long) As Long

Private Declare Function ZwClose Lib "ntdll" (ByVal ObjectHandle As Long) As Long

Private Function EnablePrivilege() As Boolean
Dim TokenHandle As Long, TokenPrivilege(3&) As Long
If ZwOpenProcessToken(-1&, &H28&, VarPtr(TokenHandle)) >= 0& Then

TokenPrivilege(0&) = 1&
TokenPrivilege(1&) = 20&
TokenPrivilege(3&) = 2&

EnablePrivilege = (ZwAdjustPrivilegesToken(TokenHandle, False, VarPtr(TokenPrivilege(0&)), 16&, 0&, 0&) >= 0&)

ZwClose TokenHandle

End If
End Function
离线Ntoskrnl

只看该作者 17楼 发表于: 2008-10-05
放血完毕,ExitProcess(0);
离线93°

只看该作者 18楼 发表于: 2008-10-05
= = !!!!!!!!!!!!
您血流不止
Intel Xeon 5405  
Microsoft Windows 7 Ultimate 64Bit
Microsoft Windows Vista Ultimate 64Bit
Microsoft Windows Server 2003
Microsoft Windows XP Pro
nVIDIA GeForce 9600 + 1GB DDR2 800Mhz x4
离线钻石guppy

只看该作者 19楼 发表于: 2008-10-05
抽了...
2009年2月21日起本帐号停用.
但因为我把新号的密码忘了,所以只好再拿出来用
快速回复
限100 字节
批量上传需要先选择文件,再选择上传
 
上一个 下一个