|
宣言と型は以下のような変更でいいでしょうか? Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As IntPtr, ByRef lpdwProcessId As Integer) As Integer Private Declare Function GetForegroundWindow Lib "user32" () As IntPtr Private Declare Function AttachThreadInput Lib "user32" (ByVal idAttach As Integer, ByVal idAttachTo As Integer, ByVal fAttach As Boolean) As Boolean Private Declare Function BringWindowToTop Lib "user32" (ByVal hWnd As IntPtr) As Boolean Private Declare Function SetForegroundWindow Lib "user32" (ByVal hWnd As IntPtr) As Integer
Private Const FORMAT_MESSAGE_FROM_SYSTEM As Integer = &H1000& Private Const FORMAT_MESSAGE_IGNORE_INSERTS As Integer = &H200& Private Declare Function FormatMessage Lib "kernel32.dll" Alias "FormatMessageA" (ByVal dwFlags As Integer, ByRef lpSource As IntPtr, ByVal dwMessageId As Integer, _ ByVal dwLanguageId As Integer, ByVal lpBuffer As Byte, ByVal nSize As Integer, ByRef Arguments As IntPtr) As Integer
|