- Timestamp:
- Oct 24, 2007, 12:32:20 AM (17 years ago)
- Location:
- trunk/bin/SubOperation
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/SubOperation/dx/main_exe_directx.abp
r187 r364 2 2 3 3 4 Dim ScreenX =640 As Long 'ディスプレイの幅 (ピクセル単位)5 Dim ScreenY =480 As Long 'ディスプレイの高さ(ピクセル単位)4 Dim ScreenX = 640 As Long 'ディスプレイの幅 (ピクセル単位) 5 Dim ScreenY = 480 As Long 'ディスプレイの高さ(ピクセル単位) 6 6 7 7 ' TODO: この位置にグローバル変数を定義してください。 8 8 9 9 10 Function InitProc() As B OOL10 Function InitProc() As Boolean 11 11 'DirectXを初期化 12 If dx_Init(hMainWnd, ScreenX,ScreenY,FALSE)=0 Then13 InitProc= 012 If dx_Init(hMainWnd, ScreenX, ScreenY, FALSE)=0 Then 13 InitProc=False 14 14 Exit Function 15 15 End If … … 20 20 ' TODO: この位置にアプリケーションの初期化コードを記述してください。 21 21 22 InitProc =122 InitProc = True 23 23 End Function 24 24 … … 49 49 '------------------------------------------------ 50 50 51 If InitProc() =0Then51 If InitProc() = False Then 52 52 MessageBox(0,"初期化に失敗しました。","Error",MB_OK or MB_ICONEXCLAMATION) 53 53 ExitProcess(0) … … 104 104 105 105 QuitProc() 106 ExitProcess(msgMain.wParam) 106 System.Environment.ExitCode = msgMain.wParam As Long 107 End -
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.