Ignore:
Timestamp:
Oct 24, 2007, 12:32:20 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

FormatFloatFを実装

Location:
trunk/bin/SubOperation/enum_process64
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/SubOperation/enum_process64/enum_process64.abp

    r187 r364  
    1010' EnumWindowsProcコールバック関数
    1111Function 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  '列挙を中断
    1414End Function
    1515
    16 Sub main(lpszCmdLine As LPSTR)
    17     Dim temporary[MAX_PATH] As Byte, temp2[1024] As Byte
     16Sub main(lpszCmdLine As LPTSTR)
     17    Dim temporary[MAX_PATH] As TCHAR, temp2[1024] As TCHAR
    1818
    19     Dim lpszBuffer As LPSTR
    20     lpszBuffer=calloc(1)
     19    Dim lpszBuffer As LPTSTR
     20    lpszBuffer=calloc(SizeOf (TCHAR))
    2121
    22     Dim szAppPath[MAX_PATH] As Byte
    23     GetModuleFileName(GetModuleHandle(0),szAppPath,MAX_PATH)
     22    Dim szAppPath[MAX_PATH] As TCHAR
     23    GetModuleFileName(GetModuleHandle(0), szAppPath, MAX_PATH)
    2424
    2525    Dim pdwProcessId As *DWord
     
    3434
    3535        'プロセス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])
    3837        If hProcess=0 Then Continue
    3938
     
    7574        End If
    7675
    77         Dim hwnd As HWND
    78         hwnd=0
     76        Dim hwnd = 0 As HWND
    7977        EnumThreadWindows(te.th32ThreadID,AddressOf(FindWindowProc),VarPtr(hwnd) As LPARAM)
    8078
     
    8381        Wend
    8482
    85         Dim szWndTitle[1024] As Byte
     83        Dim szWndTitle[1024] As TCHAR
    8684        szWndTitle[0]=0
    8785        If hwnd Then GetWindowText(hwnd,szWndTitle,1024)
     
    104102        '--------------------
    105103
    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)
    107105
    108106        lpszBuffer=realloc(lpszBuffer,lstrlen(lpszBuffer)+lstrlen(temp2)+1)
     
    119117    _splitpath(szAppPath,temporary,temp2,NULL,NULL)
    120118    lstrcat(temporary,temp2)
    121     lstrcat(temporary,"list.dat")
     119    lstrcat(temporary,ToTCStr("list.dat"))
    122120
    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)
    125122
    126123    Dim dwAccBytes As DWord
Note: See TracChangeset for help on using the changeset viewer.