Changeset 364 for trunk/bin/SubOperation/enum_process64/enum_process64.abp
- Timestamp:
- Oct 24, 2007, 12:32:20 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/SubOperation/enum_process64/enum_process64.abp
r187 r364 10 10 ' EnumWindowsProcコールバック関数 11 11 Function FindWindowProc(hwnd As HWND, lParam As LPARAM) As BOOL 12 Set _LONG_PTR(lParam As VoidPtr,hwnd As Int64)13 FindWindowProc =FALSE '列挙を中断12 SetPointer(lParam As VoidPtr, hwnd As VoidPtr) 13 FindWindowProc = FALSE '列挙を中断 14 14 End Function 15 15 16 Sub main(lpszCmdLine As LP STR)17 Dim temporary[MAX_PATH] As Byte, temp2[1024] As Byte16 Sub main(lpszCmdLine As LPTSTR) 17 Dim temporary[MAX_PATH] As TCHAR, temp2[1024] As TCHAR 18 18 19 Dim lpszBuffer As LP STR20 lpszBuffer=calloc( 1)19 Dim lpszBuffer As LPTSTR 20 lpszBuffer=calloc(SizeOf (TCHAR)) 21 21 22 Dim szAppPath[MAX_PATH] As Byte23 GetModuleFileName(GetModuleHandle(0), szAppPath,MAX_PATH)22 Dim szAppPath[MAX_PATH] As TCHAR 23 GetModuleFileName(GetModuleHandle(0), szAppPath, MAX_PATH) 24 24 25 25 Dim pdwProcessId As *DWord … … 34 34 35 35 'プロセスIDを元にハンドルを取得 36 Dim hProcess As HANDLE 37 hProcess=OpenProcess(PROCESS_ALL_ACCESS,0,pdwProcessId[i]) 36 Dim hProcess = OpenProcess(PROCESS_ALL_ACCESS,0,pdwProcessId[i]) 38 37 If hProcess=0 Then Continue 39 38 … … 75 74 End If 76 75 77 Dim hwnd As HWND 78 hwnd=0 76 Dim hwnd = 0 As HWND 79 77 EnumThreadWindows(te.th32ThreadID,AddressOf(FindWindowProc),VarPtr(hwnd) As LPARAM) 80 78 … … 83 81 Wend 84 82 85 Dim szWndTitle[1024] As Byte83 Dim szWndTitle[1024] As TCHAR 86 84 szWndTitle[0]=0 87 85 If hwnd Then GetWindowText(hwnd,szWndTitle,1024) … … 104 102 '-------------------- 105 103 106 wsprintf(temp2, Ex"\q%s\q,%d,%s,%s\r\n",temporary,pdwProcessId[i],lpszPlatform,szWndTitle)104 wsprintf(temp2,ToTCStr(Ex"\q%s\q,%d,%s,%s\r\n"),temporary,pdwProcessId[i],lpszPlatform,szWndTitle) 107 105 108 106 lpszBuffer=realloc(lpszBuffer,lstrlen(lpszBuffer)+lstrlen(temp2)+1) … … 119 117 _splitpath(szAppPath,temporary,temp2,NULL,NULL) 120 118 lstrcat(temporary,temp2) 121 lstrcat(temporary, "list.dat")119 lstrcat(temporary,ToTCStr("list.dat")) 122 120 123 Dim hFile As HANDLE 124 hFile=CreateFile(temporary,GENERIC_WRITE,0,ByVal 0,CREATE_ALWAYS,0,0) 121 Dim hFile = CreateFile(temporary,GENERIC_WRITE,0,ByVal 0,CREATE_ALWAYS,0,0) 125 122 126 123 Dim dwAccBytes As DWord
Note:
See TracChangeset
for help on using the changeset viewer.