找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
查看: 4161|回复: 5

[转载]陈辉的文件解锁模块

  [复制链接]

38

主题

199

回帖

2

精华

钻石会员

积分
3408
发表于 2010-7-6 23:53:51 | 显示全部楼层 |阅读模式
本帖最后由 HoviDelphic 于 2010-7-7 00:16 编辑

最近很多人玩锁定文件,我就转载个文件解锁吧,代码都是陈辉写的,我只是做了一点点整理。
能对抗使用ZwCreateFile进行文件独占的代码,无论是Ring 3的还是Ring 0的。
顺便爆个料,老马说陈辉现在在微点干。。。
======
modGetAllProcesses.bas

  1. Option Explicit
  2. Private Declare Function ZwQueryInformationProcess Lib "ntdll" (ByVal ProcessHandle As Long, ByVal ProcessInformationClass As Long, ByVal ProcessInformation As Long, ByVal ProcessInformationLength As Long, ByRef ReturnLength As Long) As Long
  3. Private Declare Function ZwQuerySystemInformation Lib "ntdll" (ByVal SystemInformationClass As Long, ByVal pSystemInformation As Long, ByVal SystemInformationLength As Long, ByRef ReturnLength As Long) As Long
  4. Private Declare Function ZwDuplicateObject Lib "ntdll" (ByVal SourceProcessHandle As Long, ByVal SourceHandle As Long, ByVal TargetProcessHandle As Long, ByRef TargetHandle As Long, ByVal DesiredAccess As Long, ByVal HandleAttributes As Long, ByVal Options As Long) As Long
  5. Private Declare Function ZwOpenProcess Lib "ntdll" (ByRef ProcessHandle As Long, ByVal AccessMask As Long, ByRef ObjectAttributes As OBJECT_ATTRIBUTES, ByRef ClientID As CLIENT_ID) As Long
  6. Private Declare Function ZwClose Lib "ntdll" (ByVal ObjectHandle As Long) As Long
  7. Private Declare Function RtlAdjustPrivilege Lib "ntdll" (ByVal Privilege As Long, ByVal Enable As Boolean, ByVal Client As Boolean, WasEnabled As Long) As Long
  8. Private Declare Function EnumProcessModules Lib "psapi" (ByVal hProcess As Long, ByRef lphModule As Long, ByVal cb As Long, ByVal lpcbNeeded As Long) As Long
  9. Private Declare Function GetModuleFileNameEx Lib "psapi" Alias "GetModuleFileNameExA" (ByVal hProcess As Long, ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long
  10. Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
  11. Private Declare Function VarPtrArray Lib "msvbvm60" Alias "VarPtr" (Ptr() As Any) As Long
  12. Private Type PROCESS_BASIC_INFORMATION
  13.     ExitStatus As Long
  14.     PebBaseAddress As Long
  15.     AffinityMask As Long
  16.     BasePriority As Long
  17.     UniqueProcessId As Long
  18.     InheritedFromUniqueProcessId As Long
  19. End Type
  20. Private Type SYSTEM_HANDLE_TABLE_ENTRY_INFO
  21.     UniqueProcessId As Integer
  22.     CreatorBackTraceIndex As Integer
  23.     ObjectTypeIndex As Byte
  24.     HandleAttributes As Byte
  25.     HandleValue As Integer
  26.     pObject As Long
  27.     GrantedAccess As Long
  28. End Type
  29. Private Type OBJECT_ATTRIBUTES
  30.     Length As Long
  31.     RootDirectory As Long
  32.     ObjectName As Long
  33.     Attributes As Long
  34.     SecurityDescriptor As Long
  35.     SecurityQualityOfService As Long
  36. End Type
  37. Private Type CLIENT_ID
  38.     UniqueProcess As Long
  39.     UniqueThread As Long
  40. End Type
  41. Private Type LARGE_INTEGER
  42.     LowPart As Long
  43.     HighPart As Long
  44. End Type
  45. Private Type UNICODE_STRING
  46.     Length As Integer
  47.     MaximumLength As Integer
  48.     Buffer As Long
  49. End Type
  50. Private Type IO_COUNTERSEX
  51.     ReadOperationCount As LARGE_INTEGER
  52.     WriteOperationCount As LARGE_INTEGER
  53.     OtherOperationCount As LARGE_INTEGER
  54.     ReadTransferCount As LARGE_INTEGER
  55.     WriteTransferCount As LARGE_INTEGER
  56.     OtherTransferCount As LARGE_INTEGER
  57. End Type
  58. Private Type VM_COUNTERS
  59.     PeakVirtualSize As Long
  60.     VirtualSize As Long
  61.     PageFaultCount As Long
  62.     PeakWorkingSetSize As Long
  63.     WorkingSetSize As Long
  64.     QuotaPeakPagedPoolUsage As Long
  65.     QuotaPagedPoolUsage As Long
  66.     QuotaPeakNonPagedPoolUsage As Long
  67.     QuotaNonPagedPoolUsage As Long
  68.     PagefileUsage As Long
  69.     PeakPagefileUsage As Long
  70. End Type
  71. Private Enum THREAD_STATE
  72.     StateInitialized
  73.     StateReady
  74.     StateRunning
  75.     StateStandby
  76.     StateTerminated
  77.     StateWait
  78.     StateTransition
  79.     StateUnknown
  80. End Enum
  81. Private Enum KWAIT_REASON
  82.     Executive
  83.     FreePage
  84.     PageIn
  85.     PoolAllocation
  86.     DelayExecution
  87.     Suspended
  88.     UserRequest
  89.     WrExecutive
  90.     WrFreePage
  91.     WrPageIn
  92.     WrPoolAllocation
  93.     WrDelayExecution
  94.     WrSuspended
  95.     WrUserRequest
  96.     WrEventPair
  97.     WrQueue
  98.     WrLpcReceive
  99.     WrLpcReply
  100.     WrVirtualMemory
  101.     WrPageOut
  102.     WrRendezvous
  103.     Spare2
  104.     Spare3
  105.     Spare4
  106.     Spare5
  107.     Spare6
  108.     WrKernel
  109.     MaximumWaitReason
  110. End Enum
  111. Private Type SYSTEM_THREADS
  112.     KernelTime As LARGE_INTEGER
  113.     UserTime As LARGE_INTEGER
  114.     CreateTime As LARGE_INTEGER
  115.     WaitTime As Long
  116.     StartAddress As Long
  117.     ClientID As CLIENT_ID
  118.     Priority As Long
  119.     BasePriority As Long
  120.     ContextSwitchCount As Long
  121.     State As THREAD_STATE
  122.     WaitReason As KWAIT_REASON
  123. End Type
  124. Private Type SYSTEM_PROCESSES
  125.     NextEntryDelta As Long
  126.     ThreadCount As Long
  127.     Reserved1(5) As Long
  128.     CreateTime As LARGE_INTEGER
  129.     UserTime As LARGE_INTEGER
  130.     KernelTime As LARGE_INTEGER
  131.     ProcessName As UNICODE_STRING
  132.     BasePriority As Long
  133.     ProcessId As Long
  134.     InheritedFromProcessId As Long
  135.     HandleCount As Long
  136.     SessionId As Long
  137.     Reserved2 As Long
  138.     VmCounters As VM_COUNTERS
  139.     PrivatePageCount As Long
  140.     IoCounters As IO_COUNTERSEX
  141.     Threads(0) As SYSTEM_THREADS
  142. End Type
  143. Private Type SafeArray
  144.     cDims As Integer
  145.     fFeatures As Integer
  146.     cbElements As Long
  147.     cLocks As Long
  148.     pvData As Long
  149.     cElements As Long
  150.     lLbound As Long
  151. End Type
  152. Private Const STATUS_INFO_LENGTH_MISMATCH = &HC0000004
  153. Private Const DUPLICATE_CLOSE_SOURCE = &H1
  154. Private Const DUPLICATE_SAME_ACCESS = &H2
  155. Private Const DUPLICATE_SAME_ATTRIBUTES = &H4
  156. Private Const PROCESS_VM_READ = &H10&
  157. Private Const PROCESS_QUERY_INFORMATION As Long = &H400
  158. Private Const PROCESS_ALL_ACCESS = &H1F0FFF
  159. Private Const PROCESS_DUP_HANDLE As Long = &H40
  160. Private Const SE_DEBUG_PRIVILEGE = 20
  161. Private Const FADF_AUTO As Integer = 1
  162. Private Const FADF_FIXEDSIZE As Integer = 16
  163. Public Function NT_SUCCESS(ByVal Status As Long) As Boolean
  164.     NT_SUCCESS = (Status >= 0)
  165. End Function
  166. Public Sub GetAllProcessA(ByRef lpProcessIdAry() As Long)
  167.     Dim st As Long
  168.     Dim BytBuf() As Byte
  169.     Dim sp() As SYSTEM_PROCESSES
  170.     Dim pArray As SafeArray
  171.     Dim NextEntry As Long
  172.     Dim NumOfProcess As Long
  173.     Dim ArySize As Long
  174.     Erase lpProcessIdAry
  175.     ArySize = 1
  176.     Do
  177.         ReDim BytBuf(ArySize)
  178.         st = ZwQuerySystemInformation(5, VarPtr(BytBuf(0)), ArySize, 0) '5 - SystemProcessInformation
  179.         If (Not NT_SUCCESS(st)) Then
  180.            If (st <> STATUS_INFO_LENGTH_MISMATCH) Then
  181.               Erase BytBuf
  182.               Exit Sub
  183.            End If
  184.         Else
  185.            Exit Do
  186.         End If
  187.         ArySize = ArySize * 2
  188.         ReDim BytBuf(ArySize)
  189.     Loop
  190.     With pArray
  191.         .cDims = 1
  192.         .fFeatures = FADF_AUTO Or FADF_FIXEDSIZE
  193.         .cbElements = 244
  194.         .cElements = 1
  195.         .lLbound = 0
  196.     End With
  197.     CopyMemory ByVal VarPtrArray(sp), VarPtr(pArray), 4
  198.     Do
  199.         pArray.pvData = VarPtr(BytBuf(NextEntry))
  200.         NumOfProcess = NumOfProcess + 1
  201.         ReDim Preserve lpProcessIdAry(NumOfProcess - 1)
  202.         lpProcessIdAry(NumOfProcess - 1) = sp(0).ProcessId
  203.         If sp(0).NextEntryDelta = 0 Then
  204.             Exit Do
  205.         Else
  206.             NextEntry = NextEntry + sp(0).NextEntryDelta
  207.         End If
  208.     Loop
  209.     Erase sp
  210.     Erase BytBuf
  211.     CopyMemory ByVal VarPtr(pArray), 0, Len(pArray)
  212. End Sub
复制代码


modLockFileInfo.bas

  1. Option Explicit
  2. Private Declare Function NtQueryInformationProcess Lib "NTDLL.DLL" (ByVal ProcessHandle As Long, _
  3.                                 ByVal ProcessInformationClass As PROCESSINFOCLASS, _
  4.                                 ByVal ProcessInformation As Long, _
  5.                                 ByVal ProcessInformationLength As Long, _
  6.                                 ByRef ReturnLength As Long) As Long
  7. Private Enum PROCESSINFOCLASS
  8.     ProcessBasicInformation = 0
  9.     ProcessQuotaLimits
  10.     ProcessIoCounters
  11.     ProcessVmCounters
  12.     ProcessTimes
  13.     ProcessBasePriority
  14.     ProcessRaisePriority
  15.     ProcessDebugPort
  16.     ProcessExceptionPort
  17.     ProcessAccessToken
  18.     ProcessLdtInformation
  19.     ProcessLdtSize
  20.     ProcessDefaultHardErrorMode
  21.     ProcessIoPortHandlers
  22.     ProcessPooledUsageAndLimits
  23.     ProcessWorkingSetWatch
  24.     ProcessUserModeIOPL
  25.     ProcessEnableAlignmentFaultFixup
  26.     ProcessPriorityClass
  27.     ProcessWx86Information
  28.     ProcessHandleCount
  29.     ProcessAffinityMask
  30.     ProcessPriorityBoost
  31.     ProcessDeviceMap
  32.     ProcessSessionInformation
  33.     ProcessForegroundInformation
  34.     ProcessWow64Information
  35.     ProcessImageFileName
  36.     ProcessLUIDDeviceMapsEnabled
  37.     ProcessBreakOnTermination
  38.     ProcessDebugObjectHandle
  39.     ProcessDebugFlags
  40.     ProcessHandleTracing
  41.     ProcessIoPriority
  42.     ProcessExecuteFlags
  43.     ProcessResourceManagement
  44.     ProcessCookie
  45.     ProcessImageInformation
  46.     MaxProcessInfoClass
  47. End Enum
  48. Private Type PROCESS_BASIC_INFORMATION
  49.     ExitStatus As Long 'NTSTATUS
  50.     PebBaseAddress As Long 'PPEB
  51.     AffinityMask As Long 'ULONG_PTR
  52.     BasePriority As Long 'KPRIORITY
  53.     UniqueProcessId As Long 'ULONG_PTR
  54.     InheritedFromUniqueProcessId As Long 'ULONG_PTR
  55. End Type
  56. Private Type FILE_NAME_INFORMATION
  57.      FileNameLength As Long
  58.      FileName(3) As Byte
  59. End Type
  60. Private Type NM_INFO
  61.     Info As FILE_NAME_INFORMATION
  62.     strName(259) As Byte
  63. End Type
  64. Private Enum FileInformationClass
  65.     FileDirectoryInformation = 1
  66.     FileFullDirectoryInformation = 2
  67.     FileBothDirectoryInformation = 3
  68.     FileBasicInformation = 4
  69.     FileStandardInformation = 5
  70.     FileInternalInformation = 6
  71.     FileEaInformation = 7
  72.     FileAccessInformation = 8
  73.     FileNameInformation = 9
  74.     FileRenameInformation = 10
  75.     FileLinkInformation = 11
  76.     FileNamesInformation = 12
  77.     FileDispositionInformation = 13
  78.     FilePositionInformation = 14
  79.     FileFullEaInformation = 15
  80.     FileModeInformation = 16
  81.     FileAlignmentInformation = 17
  82.     FileAllInformation = 18
  83.     FileAllocationInformation = 19
  84.     FileEndOfFileInformation = 20
  85.     FileAlternateNameInformation = 21
  86.     FileStreamInformation = 22
  87.     FilePipeInformation = 23
  88.     FilePipeLocalInformation = 24
  89.     FilePipeRemoteInformation = 25
  90.     FileMailslotQueryInformation = 26
  91.     FileMailslotSetInformation = 27
  92.     FileCompressionInformation = 28
  93.     FileObjectIdInformation = 29
  94.     FileCompletionInformation = 30
  95.     FileMoveClusterInformation = 31
  96.     FileQuotaInformation = 32
  97.     FileReparsePointInformation = 33
  98.     FileNetworkOpenInformation = 34
  99.     FileAttributeTagInformation = 35
  100.     FileTrackingInformation = 36
  101.     FileMaximumInformation
  102. End Enum
  103. Private Declare Function NtQuerySystemInformation Lib "NTDLL.DLL" (ByVal SystemInformationClass As SYSTEM_INFORMATION_CLASS, _
  104.                                 ByVal pSystemInformation As Long, _
  105.                                 ByVal SystemInformationLength As Long, _
  106.                                 ByRef ReturnLength As Long) As Long
  107.                               
  108. Private Enum SYSTEM_INFORMATION_CLASS
  109.     SystemBasicInformation
  110.     SystemProcessorInformation             '// obsolete...delete
  111.     SystemPerformanceInformation
  112.     SystemTimeOfDayInformation
  113.     SystemPathInformation
  114.     SystemProcessInformation
  115.     SystemCallCountInformation
  116.     SystemDeviceInformation
  117.     SystemProcessorPerformanceInformation
  118.     SystemFlagsInformation
  119.     SystemCallTimeInformation
  120.     SystemModuleInformation
  121.     SystemLocksInformation
  122.     SystemStackTraceInformation
  123.     SystemPagedPoolInformation
  124.     SystemNonPagedPoolInformation
  125.     SystemHandleInformation
  126.     SystemObjectInformation
  127.     SystemPageFileInformation
  128.     SystemVdmInstemulInformation
  129.     SystemVdmBopInformation
  130.     SystemFileCacheInformation
  131.     SystemPoolTagInformation
  132.     SystemInterruptInformation
  133.     SystemDpcBehaviorInformation
  134.     SystemFullMemoryInformation
  135.     SystemLoadGdiDriverInformation
  136.     SystemUnloadGdiDriverInformation
  137.     SystemTimeAdjustmentInformation
  138.     SystemSummaryMemoryInformation
  139.     SystemMirrorMemoryInformation
  140.     SystemPerformanceTraceInformation
  141.     SystemObsolete0
  142.     SystemExceptionInformation
  143.     SystemCrashDumpStateInformation
  144.     SystemKernelDebuggerInformation
  145.     SystemContextSwitchInformation
  146.     SystemRegistryQuotaInformation
  147.     SystemExtendServiceTableInformation
  148.     SystemPrioritySeperation
  149.     SystemVerifierAddDriverInformation
  150.     SystemVerifierRemoveDriverInformation
  151.     SystemProcessorIdleInformation
  152.     SystemLegacyDriverInformation
  153.     SystemCurrentTimeZoneInformation
  154.     SystemLookasideInformation
  155.     SystemTimeSlipNotification
  156.     SystemSessionCreate
  157.     SystemSessionDetach
  158.     SystemSessionInformation
  159.     SystemRangeStartInformation
  160.     SystemVerifierInformation
  161.     SystemVerifierThunkExtend
  162.     SystemSessionProcessInformation
  163.     SystemLoadGdiDriverInSystemSpace
  164.     SystemNumaProcessorMap
  165.     SystemPrefetcherInformation
  166.     SystemExtendedProcessInformation
  167.     SystemRecommendedSharedDataAlignment
  168.     SystemComPlusPackage
  169.     SystemNumaAvailableMemory
  170.     SystemProcessorPowerInformation
  171.     SystemEmulationBasicInformation
  172.     SystemEmulationProcessorInformation
  173.     SystemExtendedHandleInformation
  174.     SystemLostDelayedWriteInformation
  175.     SystemBigPoolInformation
  176.     SystemSessionPoolTagInformation
  177.     SystemSessionMappedViewInformation
  178.     SystemHotpatchInformation
  179.     SystemObjectSecurityMode
  180.     SystemWatchdogTimerHandler
  181.     SystemWatchdogTimerInformation
  182.     SystemLogicalProcessorInformation
  183.     SystemWow64SharedInformation
  184.     SystemRegisterFirmwareTableInformationHandler
  185.     SystemFirmwareTableInformation
  186.     SystemModuleInformationEx
  187.     SystemVerifierTriageInformation
  188.     SystemSuperfetchInformation
  189.     SystemMemoryListInformation
  190.     SystemFileCacheInformationEx
  191.     MaxSystemInfoClass  '// MaxSystemInfoClass should always be the last enum
  192. End Enum
  193. Private Type SYSTEM_HANDLE
  194.     UniqueProcessId As Integer
  195.     CreatorBackTraceIndex As Integer
  196.     ObjectTypeIndex As Byte
  197.     HandleAttributes As Byte
  198.     HandleValue As Integer
  199.     pObject As Long
  200.     GrantedAccess As Long
  201. End Type
  202. Private Const STATUS_INFO_LENGTH_MISMATCH = &HC0000004
  203. Private Enum SYSTEM_HANDLE_TYPE
  204.     OB_TYPE_UNKNOWN = 0
  205.     OB_TYPE_TYPE = 1
  206.     OB_TYPE_DIRECTORY
  207.     OB_TYPE_SYMBOLIC_LINK
  208.     OB_TYPE_TOKEN
  209.     OB_TYPE_PROCESS
  210.     OB_TYPE_THREAD
  211.     OB_TYPE_UNKNOWN_7
  212.     OB_TYPE_EVENT
  213.     OB_TYPE_EVENT_PAIR
  214.     OB_TYPE_MUTANT
  215.     OB_TYPE_UNKNOWN_11
  216.     OB_TYPE_SEMAPHORE
  217.     OB_TYPE_TIMER
  218.     OB_TYPE_PROFILE
  219.     OB_TYPE_WINDOW_STATION
  220.     OB_TYPE_DESKTOP
  221.     OB_TYPE_SECTION
  222.     OB_TYPE_KEY
  223.     OB_TYPE_PORT
  224.     OB_TYPE_WAITABLE_PORT
  225.     OB_TYPE_UNKNOWN_21
  226.     OB_TYPE_UNKNOWN_22
  227.     OB_TYPE_UNKNOWN_23
  228.     OB_TYPE_UNKNOWN_24
  229.     OB_TYPE_IO_COMPLETION
  230.     OB_TYPE_FILE
  231. End Enum
  232. 'typedef struct _SYSTEM_HANDLE_INFORMATION
  233. '{
  234. '   ULONG           uCount;
  235. '   SYSTEM_HANDLE   aSH[];
  236. '} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
  237. Private Type SYSTEM_HANDLE_INFORMATION
  238.     uCount As Long
  239.     aSH() As SYSTEM_HANDLE
  240. End Type
  241. Private Declare Function NtDuplicateObject Lib "NTDLL.DLL" (ByVal SourceProcessHandle As Long, _
  242.                                 ByVal SourceHandle As Long, _
  243.                                 ByVal TargetProcessHandle As Long, _
  244.                                 ByRef TargetHandle As Long, _
  245.                                 ByVal DesiredAccess As Long, _
  246.                                 ByVal HandleAttributes As Long, _
  247.                                 ByVal Options As Long) As Long
  248. Private Const DUPLICATE_CLOSE_SOURCE = &H1
  249. Private Const DUPLICATE_SAME_ACCESS = &H2
  250. Private Const DUPLICATE_SAME_ATTRIBUTES = &H4
  251. Private Declare Function NtOpenProcess Lib "NTDLL.DLL" (ByRef ProcessHandle As Long, _
  252.                                 ByVal AccessMask As Long, _
  253.                                 ByRef ObjectAttributes As OBJECT_ATTRIBUTES, _
  254.                                 ByRef ClientID As CLIENT_ID) As Long
  255. Private Type OBJECT_ATTRIBUTES
  256.     Length As Long
  257.     RootDirectory As Long
  258.     ObjectName As Long
  259.     Attributes As Long
  260.     SecurityDescriptor As Long
  261.     SecurityQualityOfService As Long
  262. End Type
  263. Private Type CLIENT_ID
  264.     UniqueProcess As Long
  265.     UniqueThread  As Long
  266. End Type
  267. Private Type IO_STATUS_BLOCK
  268.     Status As Long
  269.     uInformation As Long
  270. End Type
  271. Private Const PROCESS_CREATE_THREAD = &H2
  272. Private Const PROCESS_VM_WRITE = &H20
  273. Private Const PROCESS_VM_OPERATION = &H8
  274. Private Const PROCESS_QUERY_INFORMATION As Long = (&H400)
  275. Private Const STANDARD_RIGHTS_REQUIRED As Long = &HF0000
  276. Private Const SYNCHRONIZE As Long = &H100000
  277. Private Const PROCESS_ALL_ACCESS As Long = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &HFFF)
  278. Private Const PROCESS_DUP_HANDLE As Long = (&H40)
  279. Private Declare Function NtClose Lib "NTDLL.DLL" (ByVal ObjectHandle As Long) As Long
  280. Private Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (ByRef Destination As Any, _
  281.                                       ByRef Source As Any, _
  282.                                       ByVal Length As Long)
  283.                                       
  284. Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
  285. Private Enum OBJECT_INFORMATION_CLASS
  286.     ObjectBasicInformation = 0
  287.     ObjectNameInformation
  288.     ObjectTypeInformation
  289.     ObjectAllTypesInformation
  290.     ObjectHandleInformation
  291. End Enum
  292. Private Type UNICODE_STRING
  293.     uLength As Integer
  294.     uMaximumLength As Integer
  295.     pBuffer(3) As Byte
  296. End Type
  297. Private Type OBJECT_NAME_INFORMATION
  298.     pName As UNICODE_STRING
  299. End Type
  300. Private Const STATUS_INFO_LEN_MISMATCH = &HC0000004
  301. Private Const HEAP_ZERO_MEMORY = &H8
  302. Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
  303. Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
  304. Private Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
  305. Private Declare Function GetProcessHeap Lib "kernel32" () As Long
  306. Private Declare Function HeapFree Lib "kernel32" (ByVal hHeap As Long, ByVal dwFlags As Long, lpMem As Any) As Long
  307. Private Declare Function HeapReAlloc Lib "kernel32" (ByVal hHeap As Long, ByVal dwFlags As Long, lpMem As Any, ByVal dwBytes As Long) As Long
  308. Private Declare Function HeapAlloc Lib "kernel32" (ByVal hHeap As Long, ByVal dwFlags As Long, ByVal dwBytes As Long) As Long
  309. Private Declare Function NtQueryObject Lib "NTDLL.DLL" (ByVal ObjectHandle As Long, _
  310.                                                         ByVal ObjectInformationClass As OBJECT_INFORMATION_CLASS, _
  311.                                                         ByVal ObjectInformation As Long, ByVal ObjectInformationLength As Long, _
  312.                                                         ReturnLength As Long) As Long
  313. Private Declare Function lstrlenW Lib "kernel32" (ByVal lpString As Long) As Long
  314. Private Declare Function QueryDosDevice Lib "kernel32" Alias "QueryDosDeviceA" (ByVal lpDeviceName As String, ByVal lpTargetPath As String, ByVal ucchMax As Long) As Long
  315. Private Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
  316. Private Declare Function lstrcpyW Lib "kernel32" (ByVal lpString1 As String, ByVal lpString2 As Long) As Long
  317. Public Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (ByVal hWnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long
  318. Private Declare Function CreateRemoteThread Lib "kernel32" (ByVal hProcess As Long, lpThreadAttributes As Any, ByVal dwStackSize As Long, lpStartAddress As Long, lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long
  319. Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
  320. Private Declare Function GetExitCodeThread Lib "kernel32" (ByVal hThread As Long, lpExitCode As Long) As Long
  321. Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
  322. Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
  323. Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long
  324. Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
  325. Private Declare Function TerminateThread Lib "kernel32" (ByVal hThread As Long, ByVal dwExitCode As Long) As Long
  326. Private Declare Function GetFileType Lib "kernel32" (ByVal hFile As Long) As Long
  327. Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  328. Private Function NT_SUCCESS(ByVal nStatus As Long) As Boolean
  329.     NT_SUCCESS = (nStatus >= 0)
  330. End Function
  331. Public Function GetFileFullPath(ByVal hFile As Long) As String
  332.     Dim hHeap As Long, dwSize As Long, objName As UNICODE_STRING, pName As Long
  333.     Dim ntStatus As Long, i As Long, lngNameSize As Long, strDrives As String, strArray() As String
  334.     Dim dwDriversSize As Long, strDrive As String, strTmp As String, strTemp As String
  335.     On Error GoTo ErrHandle
  336.     hHeap = GetProcessHeap
  337.     pName = HeapAlloc(hHeap, HEAP_ZERO_MEMORY, &H1000)
  338.     ntStatus = NtQueryObject(hFile, ObjectNameInformation, pName, &H1000, dwSize)
  339.     If (NT_SUCCESS(ntStatus)) Then
  340.         i = 1
  341.         Do While (ntStatus = STATUS_INFO_LEN_MISMATCH)
  342.             pName = HeapReAlloc(hHeap, HEAP_ZERO_MEMORY, pName, &H1000 * i)
  343.             ntStatus = NtQueryObject(hFile, ObjectNameInformation, pName, &H1000, ByVal 0)
  344.             i = i + 1
  345.         Loop
  346.     End If
  347.     HeapFree hHeap, 0, pName
  348.     strTemp = String(512, Chr(0))
  349.     lstrcpyW strTemp, pName + Len(objName)
  350.     strTemp = StrConv(strTemp, vbFromUnicode)
  351.     strTemp = Left(strTemp, InStr(strTemp, Chr(0)) - 1)
  352.     strDrives = String(512, Chr(9))
  353.     dwDriversSize = GetLogicalDriveStrings(512, strDrives)
  354.     If dwDriversSize Then
  355.         strArray = Split(strDrives, Chr(0))
  356.         For i = 0 To UBound(strArray)
  357.             If strArray(i) <> "" Then
  358.                 strDrive = Left(strArray(i), 2)
  359.                 strTmp = String(260, Chr(0))
  360.                 Call QueryDosDevice(strDrive, strTmp, 256)
  361.                 strTmp = Left(strTmp, InStr(strTmp, Chr(0)) - 1)
  362.                 If InStr(LCase(strTemp), LCase(strTmp)) = 1 Then
  363.                     GetFileFullPath = strDrive & Mid(strTemp, Len(strTmp) + 1, Len(strTemp) - Len(strTmp))
  364.                     Exit Function
  365.                 End If
  366.             End If
  367.         Next
  368.     End If
  369. ErrHandle:
  370. End Function
  371. Public Function CloseLockFileHandle(ByVal strFileName As String, ByVal dwProcessId As Long) As Boolean
  372.     Dim ntStatus As Long
  373.     Dim objCid As CLIENT_ID
  374.     Dim objOa As OBJECT_ATTRIBUTES
  375.     Dim lngHandles As Long
  376.     Dim i As Long
  377.     Dim objInfo As SYSTEM_HANDLE_INFORMATION, lngType As Long
  378.     Dim hProcess As Long, hProcessToDup As Long, hFileHandle As Long
  379.     Dim hFile As Long
  380.     'Dim objIo As IO_STATUS_BLOCK, objFn As FILE_NAME_INFORMATION, objN As NM_INFO
  381.     Dim bytBytes() As Byte, strSubPath As String, strTmp As String
  382.     Dim blnIsOk As Boolean
  383.     strSubPath = Mid(strFileName, 3, Len(strFileName) - 2)
  384.     hFile = CreateFile("NUL", &H80000000, 0, ByVal 0&, 3, 0, 0)
  385.     If hFile = -1 Then
  386.         CloseLockFileHandle = False
  387.         Exit Function
  388.     End If
  389.     objOa.Length = Len(objOa)
  390.     objCid.UniqueProcess = dwProcessId
  391.     ntStatus = 0
  392.     Dim BytBuf() As Byte
  393.     Dim nSize As Long
  394.     nSize = 1
  395.     Do
  396.         ReDim BytBuf(nSize)
  397.         ntStatus = NtQuerySystemInformation(SystemHandleInformation, VarPtr(BytBuf(0)), nSize, 0&)
  398.         If (Not NT_SUCCESS(ntStatus)) Then
  399.             If (ntStatus <> STATUS_INFO_LENGTH_MISMATCH) Then
  400.                 Erase BytBuf
  401.                 Exit Function
  402.             End If
  403.         Else
  404.             Exit Do
  405.         End If
  406.         nSize = nSize * 2
  407.         ReDim BytBuf(nSize)
  408.     Loop
  409.     lngHandles = 0
  410.     CopyMemory objInfo.uCount, BytBuf(0), 4
  411.     lngHandles = objInfo.uCount
  412.     ReDim objInfo.aSH(lngHandles - 1)
  413.     Call CopyMemory(objInfo.aSH(0), BytBuf(4), Len(objInfo.aSH(0)) * lngHandles)
  414.     For i = 0 To lngHandles - 1
  415.         If objInfo.aSH(i).HandleValue = hFile And objInfo.aSH(i).UniqueProcessId = GetCurrentProcessId Then
  416.             lngType = objInfo.aSH(i).ObjectTypeIndex
  417.             Exit For
  418.         End If
  419.     Next
  420.     NtClose hFile
  421.     blnIsOk = True
  422.     For i = 0 To lngHandles - 1
  423.         If objInfo.aSH(i).ObjectTypeIndex = lngType And objInfo.aSH(i).UniqueProcessId = dwProcessId Then
  424.             ntStatus = NtOpenProcess(hProcessToDup, PROCESS_DUP_HANDLE, objOa, objCid)
  425.             If hProcessToDup <> 0 Then
  426.                 ntStatus = NtDuplicateObject(hProcessToDup, objInfo.aSH(i).HandleValue, GetCurrentProcess, hFileHandle, 0, 0, DUPLICATE_SAME_ATTRIBUTES)
  427.                 If (NT_SUCCESS(ntStatus)) Then
  428.                     '这里如果直接调用NtQueryObject可能会挂起解决方法是用线程去处理当线程处理时间超过一定时间就把它干掉
  429.                     '由于VB对多线程支持很差,其实应该说是对CreateThread支持很差,什么原因不要问我,相信网上也写有不少
  430.                     '文件是关于它的,这里我选择了另一个函数也可以建立线程但是它是建立远程线程的,不过它却很稳定正好解决了
  431.                     '我们这里的问题它就是CreateRemoteThread,^_^还记得我说过它很强大吧~~哈哈。
  432.                     ntStatus = MyGetFileType(hFileHandle)
  433.                     If ntStatus Then
  434.                         strTmp = GetFileFullPath(hFileHandle)
  435.                     End If
  436.                     NtClose hFileHandle
  437.                     If InStr(LCase(strTmp), LCase(strFileName)) Then
  438.                         If Not CloseRemoteHandle(dwProcessId, objInfo.aSH(i).HandleValue, strFileName) Then
  439.                             blnIsOk = False
  440.                         End If
  441.                     End If
  442.                 End If
  443.             End If
  444.         End If
  445.     Next
  446.     CloseLockFileHandle = blnIsOk
  447. End Function
  448. '检测所有进程
  449. Public Function CloseLoackFiles(ByVal strFileName As String) As Boolean
  450.     Dim ntStatus As Long
  451.     Dim objCid As CLIENT_ID
  452.     Dim objOa As OBJECT_ATTRIBUTES
  453.     Dim lngHandles As Long
  454.     Dim i As Long
  455.     Dim objInfo As SYSTEM_HANDLE_INFORMATION, lngType As Long
  456.     Dim hProcess As Long, hProcessToDup As Long, hFileHandle As Long
  457.     Dim hFile As Long, blnIsOk As Boolean, strProcessName As String
  458.     'Dim objIo As IO_STATUS_BLOCK, objFn As FILE_NAME_INFORMATION, objN As NM_INFO
  459.     Dim bytBytes() As Byte, strSubPath As String, strTmp As String
  460.     strSubPath = Mid(strFileName, 3, Len(strFileName) - 2)
  461.     hFile = CreateFile("NUL", &H80000000, 0, ByVal 0&, 3, 0, 0)
  462.     If hFile = -1 Then
  463.         CloseLoackFiles = False
  464.         Exit Function
  465.     End If
  466.     objOa.Length = Len(objOa)
  467.     ntStatus = 0
  468.     Dim BytBuf() As Byte
  469.     Dim nSize As Long
  470.     nSize = 1
  471.     Do
  472.         ReDim BytBuf(nSize)
  473.         ntStatus = NtQuerySystemInformation(SystemHandleInformation, VarPtr(BytBuf(0)), nSize, 0&)
  474.         If (Not NT_SUCCESS(ntStatus)) Then
  475.             If (ntStatus <> STATUS_INFO_LENGTH_MISMATCH) Then
  476.                 Erase BytBuf
  477.                 Exit Function
  478.             End If
  479.         Else
  480.             Exit Do
  481.         End If
  482.         nSize = nSize * 2
  483.         ReDim BytBuf(nSize)
  484.     Loop
  485.     lngHandles = 0
  486.     CopyMemory objInfo.uCount, BytBuf(0), 4
  487.     lngHandles = objInfo.uCount
  488.     ReDim objInfo.aSH(lngHandles - 1)
  489.     Call CopyMemory(objInfo.aSH(0), BytBuf(4), Len(objInfo.aSH(0)) * lngHandles)
  490.     For i = 0 To lngHandles - 1
  491.         If objInfo.aSH(i).HandleValue = hFile And objInfo.aSH(i).UniqueProcessId = GetCurrentProcessId Then
  492.             lngType = objInfo.aSH(i).ObjectTypeIndex
  493.             Exit For
  494.         End If
  495.     Next
  496.     NtClose hFile
  497.     blnIsOk = True
  498.     For i = 0 To lngHandles - 1
  499.         If objInfo.aSH(i).ObjectTypeIndex = lngType Then
  500.             objCid.UniqueProcess = objInfo.aSH(i).UniqueProcessId
  501.             ntStatus = NtOpenProcess(hProcessToDup, PROCESS_DUP_HANDLE, objOa, objCid)
  502.             If hProcessToDup <> 0 Then
  503.                 ntStatus = NtDuplicateObject(hProcessToDup, objInfo.aSH(i).HandleValue, GetCurrentProcess, hFileHandle, 0, 0, DUPLICATE_SAME_ATTRIBUTES)
  504.                 If (NT_SUCCESS(ntStatus)) Then
  505.                     '这里如果直接调用NtQueryObject可能会挂起解决方法是用线程去处理当线程处理时间超过一定时间就把它干掉
  506.                     '由于VB对多线程支持很差,其实应该说是对CreateThread支持很差,什么原因不要问我,相信网上也写有不少
  507.                     '文件是关于它的,这里我选择了另一个函数也可以建立线程但是它是建立远程线程的,不过它却很稳定正好解决了
  508.                     '我们这里的问题它就是CreateRemoteThread,^_^还记得我说过它很强大吧~~哈哈。
  509.                     ntStatus = MyGetFileType(hFileHandle)
  510.                     If ntStatus Then
  511.                         strTmp = GetFileFullPath(hFileHandle)
  512.                     Else
  513.                         strTmp = ""
  514.                     End If
  515.                     NtClose hFileHandle
  516.                     If InStr(LCase(strTmp), LCase(strFileName)) Then
  517.                         If Not CloseRemoteHandle(objInfo.aSH(i).UniqueProcessId, objInfo.aSH(i).HandleValue, strTmp) Then
  518.                             blnIsOk = False
  519.                         End If
  520.                     End If
  521.                 End If
  522.             End If
  523.         End If
  524.     Next
  525.     CloseLoackFiles = blnIsOk
  526. End Function
  527. Private Function GetProcessCommandLine(ByVal dwProcessId As Long) As String
  528.     Dim objCid As CLIENT_ID
  529.     Dim objOa As OBJECT_ATTRIBUTES
  530.     Dim ntStatus As Long, hKernel As Long, strName As String
  531.     Dim hProcess As Long, dwAddr As Long, dwRead As Long
  532.     objOa.Length = Len(objOa)
  533.     objCid.UniqueProcess = dwProcessId
  534.     ntStatus = NtOpenProcess(hProcess, &H10, objOa, objCid)
  535.     If hProcess = 0 Then
  536.         GetProcessCommandLine = ""
  537.         Exit Function
  538.     End If
  539.     hKernel = GetModuleHandle("kernel32")
  540.     dwAddr = GetProcAddress(hKernel, "GetCommandLineA")
  541.     CopyMemory dwAddr, ByVal dwAddr + 1, 4
  542.     If ReadProcessMemory(hProcess, ByVal dwAddr, dwAddr, 4, dwRead) Then
  543.         strName = String(260, Chr(0))
  544.         If ReadProcessMemory(hProcess, ByVal dwAddr, ByVal strName, 260, dwRead) Then
  545.             strName = Left(strName, InStr(strName, Chr(0)) - 1)
  546.             NtClose hProcess
  547.             GetProcessCommandLine = strName
  548.             Exit Function
  549.         End If
  550.     End If
  551.     NtClose hProcess
  552. End Function
  553. '解锁指定进程的锁定文件
  554. Public Function CloseRemoteHandle(ByVal dwProcessId, ByVal hHandle As Long, Optional ByVal strLockFile As String = "") As Boolean
  555.     Dim hMyProcess  As Long, hRemProcess As Long, blnResult As Long, hMyHandle As Long
  556.     Dim objCid As CLIENT_ID
  557.     Dim objOa As OBJECT_ATTRIBUTES
  558.     Dim ntStatus As Long, strProcessName As String, hProcess As Long, strMsg As String
  559.     objCid.UniqueProcess = dwProcessId
  560.     objOa.Length = Len(objOa)
  561.     hMyProcess = GetCurrentProcess()
  562.     ntStatus = NtOpenProcess(hRemProcess, PROCESS_DUP_HANDLE, objOa, objCid)
  563.     If hRemProcess Then
  564.         ntStatus = NtDuplicateObject(hRemProcess, hHandle, GetCurrentProcess, hMyHandle, 0, 0, DUPLICATE_CLOSE_SOURCE Or DUPLICATE_SAME_ACCESS)
  565.         If (NT_SUCCESS(ntStatus)) Then
  566.         'If DuplicateHandle(hRemProcess, hMyProcess, hHandle, hMyHandle, 0, 0, DUPLICATE_CLOSE_SOURCE Or DUPLICATE_SAME_ACCESS) Then
  567.             blnResult = NtClose(hMyHandle)
  568.             If blnResult >= 0 Then
  569.                 strProcessName = GetProcessCommandLine(dwProcessId)
  570.                 'If InStr(LCase(strProcessName), LCase(strLockFile)) Then
  571.                 'If InStr(LCase(strProcessName), "explorer.exe") = 0 And dwProcessId <> GetCurrentProcessId Then
  572.                     'objCid.UniqueProcess = dwProcessId
  573.                     'ntStatus = NtOpenProcess(hProcess, 1, objOa, objCid)
  574.                     'If hProcess <> 0 Then TerminateProcess hProcess, 0
  575.                 'End If
  576.             End If
  577.         End If
  578.         Call NtClose(hRemProcess)
  579.     End If
  580.     CloseRemoteHandle = blnResult >= 0
  581. End Function
  582. '解锁指定进程的锁定文件
  583. Public Function CloseRemoteHandleEx(ByVal dwProcessId, ByVal hHandle As Long, Optional ByVal strLockFile As String = "") As Boolean
  584.     Dim hRemProcess As Long, hThread As Long, lngResult As Long, pfnThreadRtn As Long, hKernel As Long
  585.     Dim objCid As CLIENT_ID
  586.     Dim objOa As OBJECT_ATTRIBUTES, strMsg As String
  587.     Dim ntStatus As Long, strProcessName As String, hProcess As Long
  588.     objCid.UniqueProcess = dwProcessId
  589.     objOa.Length = Len(objOa)
  590.     ntStatus = NtOpenProcess(hRemProcess, PROCESS_QUERY_INFORMATION Or PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, objOa, objCid)
  591. '    hMyProcess = OpenProcess(PROCESS_QUERY_INFORMATION Or PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, 0, dwProcessId)
  592.     If hRemProcess = 0 Then
  593.         CloseRemoteHandleEx = False
  594.         Exit Function
  595.     End If
  596.     hKernel = GetModuleHandle("kernel32")
  597.     If hKernel = 0 Then
  598.         CloseRemoteHandleEx = False
  599.         Exit Function
  600.     End If
  601.     pfnThreadRtn = GetProcAddress(hKernel, "CloseHandle")
  602.     If pfnThreadRtn = 0 Then
  603.         FreeLibrary hKernel
  604.         CloseRemoteHandleEx = False
  605.         Exit Function
  606.     End If
  607.     hThread = CreateRemoteThread(hRemProcess, ByVal 0&, 0&, ByVal pfnThreadRtn, ByVal hHandle, 0, 0&)
  608.     If hThread = 0 Then
  609.         FreeLibrary hKernel
  610.         CloseRemoteHandleEx = False
  611.         Exit Function
  612.     End If
  613.     GetExitCodeThread hThread, lngResult
  614.     CloseRemoteHandleEx = CBool(lngResult)
  615.     strProcessName = GetProcessCommandLine(dwProcessId)
  616.     'If InStr(strProcessName, strLockFile) Then
  617.     '    objCid.UniqueProcess = dwProcessId
  618.     '    ntStatus = NtOpenProcess(hProcess, 1, objOa, objCid)
  619.         'If hProcess <> 0 Then TerminateProcess hProcess, 0
  620.     'End If
  621.     NtClose hThread
  622.     NtClose hRemProcess
  623.     FreeLibrary hKernel
  624. End Function
  625. Private Function MyGetFileType(ByVal hFile As Long) As Long
  626.     Dim hRemProcess As Long, hThread As Long, lngResult As Long, pfnThreadRtn As Long, hKernel As Long
  627.     Dim dwEax As Long, dwTimeOut As Long
  628.     hRemProcess = GetCurrentProcess
  629.     hKernel = GetModuleHandle("kernel32")
  630.     If hKernel = 0 Then
  631.         MyGetFileType = 0
  632.         Exit Function
  633.     End If
  634.     pfnThreadRtn = GetProcAddress(hKernel, "GetFileType")
  635.     If pfnThreadRtn = 0 Then
  636.         FreeLibrary hKernel
  637.         MyGetFileType = 0
  638.         Exit Function
  639.     End If
  640.     hThread = CreateRemoteThread(hRemProcess, ByVal 0&, 0&, ByVal pfnThreadRtn, ByVal hFile, 0, ByVal 0&)
  641.     dwEax = WaitForSingleObject(hThread, 100)
  642.     If dwEax = &H102 Then
  643.         Call GetExitCodeThread(hThread, dwTimeOut)
  644.         Call TerminateThread(hThread, dwTimeOut)
  645.         NtClose hThread
  646.         MyGetFileType = 0
  647.         Exit Function
  648.     End If
  649.     If hThread = 0 Then
  650.         FreeLibrary hKernel
  651.         MyGetFileType = False
  652.         Exit Function
  653.     End If
  654.     GetExitCodeThread hThread, lngResult
  655.     MyGetFileType = lngResult
  656.     NtClose hThread
  657.     NtClose hRemProcess
  658.     FreeLibrary hKernel
  659. End Function
复制代码


modUnlockFile.bas

  1. Public Sub UnlockFile(Byval szFileName As String)
  2.     Dim i As Long
  3.     Dim pids() As Long
  4.     Call GetAllProcessA(pids)
  5.     For i = 0 To UBound(pids)
  6.         CloseLockFileHandle szFileName, pids(i)
  7.     Next
  8.     Erase pids
  9. End Sub
复制代码

评分

参与人数 1水晶币 +10 +20 收起 理由
阿杰 + 10 + 20 精品文章

查看全部评分

如果附件无法下载,请点击这里

38

主题

199

回帖

2

精华

钻石会员

积分
3408
 楼主| 发表于 2010-7-7 00:16:57 | 显示全部楼层
陈辉博客:http://blog.csdn.net/chenhui530
有很多很有价值的技术文章。
如果附件无法下载,请点击这里

275

主题

3017

回帖

1

精华

管理员

嗷嗷叫的老马

积分
17064

论坛牛人贡献奖关注奖最佳版主进步奖人气王疯狂作品奖精英奖赞助论坛勋章乐于助人勋章

QQ
发表于 2010-7-7 13:14:19 | 显示全部楼层
陈辉这小子最近比较忙.
我就是嗷嗷叫的老马了......

本网站最菜的人 该用户已被删除
发表于 2010-7-7 20:25:12 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽

1214

主题

352

回帖

11

精华

管理员

菜鸟

积分
93755

贡献奖关注奖人气王精英奖乐于助人勋章

发表于 2010-7-7 21:30:08 | 显示全部楼层
这个不错,比较实用
【VB】QQ群:1422505加的请打上VB好友
【易语言】QQ群:9531809  或 177048
【FOXPRO】QQ群:6580324  或 33659603
【C/C++/VC】QQ群:3777552
【NiceBasic】QQ群:3703755

280

主题

203

回帖

0

精华

版主

积分
1808
发表于 2010-7-8 21:39:43 | 显示全部楼层
不错的源码
您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

快速回复 返回顶部 返回列表