This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Declare PtrSafe Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As LongPtr | |
Private Declare Function IsBadWritePtr Lib "kernel32" _ | |
(ByVal lp As Long, ByVal ucb As Long) As Long | |
Private Declare Function VirtualProtect Lib "kernel32" _ | |
(ByVal lpAddress As Long, ByVal dwSize As Long, _ | |
ByVal flNewProtect As Long, lpflOldProtect As Long) As Long | |
Private Declare Function VirtualAlloc Lib "kernel32" _ | |
(ByVal lpAddress As Long, ByVal dwSize As Long, _ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'http://www.ka-net.org/office/of12.html | |
'Microsoft HTML Object Library | |
Private d As MSHTML.HTMLDocument | |
Private w As MSHTML.IHTMLWindow2 | |
Private TimerId As Long |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'目的の要素を選択 | |
Sub Main() | |
Application.OnTime Now + TimeSerial(0, 0, 2), "GetSub" | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Implements IUIAutomationEventHandler | |
Private Sub IUIAutomationEventHandler_HandleAutomationEvent(ByVal sender As UIAutomationClient.IUIAutomationElement, ByVal eventId As Long) | |
Dim iElemFound As IUIAutomationElement | |
Set iElemFound = GetElement(o, sender, "はい(Y)", 0) | |
If iElemFound Is Nothing Then Exit Sub | |
If iElemFound.CurrentName = "はい(Y)" Then | |
Dim InvokePattern As IUIAutomationInvokePattern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Enum ICONS | |
TD_WARNING_ICON = 65535 | |
TD_ERROR_ICON = 65534 | |
TD_INFORMATION_ICON = 65533 | |
TD_SHIELD_ICON = 65532 | |
End Enum | |
Enum TASKDIALOG_FLAGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Enum MONITORS | |
MONITOR_DEFAULTTONULL | |
MONITOR_DEFAULTTOPRIMARY | |
MONITOR_DEFAULTTONEAREST | |
End Enum | |
Const PHYSICAL_MONITOR_DESCRIPTION_SIZE = 128 - 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Declare PtrSafe Function FindWindowEx Lib "user32" Alias "FindWindowExW" (ByVal hWnd1 As LongPtr, ByVal hWnd2 As LongPtr, ByVal lpsz1 As LongPtr, ByVal lpsz2 As LongPtr) As LongPtr | |
Private Declare PtrSafe Function VirtualProtect Lib "kernel32" (ByVal lpAddress As Any, _ | |
ByVal dwSize As LongLong, _ | |
ByVal flNewProtect As Long, _ | |
lpflOldProtect As Long) As Long | |
Const PAGE_EXECUTE_READ = &H20& | |
Const PAGE_EXECUTE = &H10 | |
Private Declare PtrSafe Function SetWindowSubclass Lib "C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.16384_none_62475f7becb72503\comctl32.dll" (ByVal hWnd As LongPtr, ByVal pfnSubclass As LongPtr, ByVal uIdSubclass As LongPtr, ByVal dwRefData As LongPtr) As Long | |
Private Declare PtrSafe Function RemoveWindowSubclass Lib "C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.16384_none_62475f7becb72503\comctl32.dll" (ByVal hWnd As LongPtr, ByVal pfnSubclass As LongPtr, ByVal uIdSubclass As Lon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Type SECURITY_ATTRIBUTES | |
nLength As Long | |
lpSecurityDescriptor As LongPtr | |
bInheritHandle As Long | |
End Type | |
Private Declare Function MsgWaitForMultipleObjects Lib "user32" _ | |
(ByVal nCount As Long, pHandles As Long, _ | |
ByVal fWaitAll As Long, ByVal dwMilliseconds As Long, _ | |
ByVal dwWakeMask As Long) As Long |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Declare Function ILCreateFromPathW& Lib "Shell32.dll" (ByVal pszPath&) | |
Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" _ | |
(Destination As Any, Source As Any, ByVal Length As Long) | |
Declare Sub ILFree Lib "Shell32.dll" (ByVal pidl&) | |
Declare Function ILGetSize& Lib "Shell32.dll" (ByVal pidl&) | |
Private Declare _ | |
Function InitVariantFromBuffer Lib "propsys.dll" ( _ | |
ByVal pv As LongPtr, _ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Type SECURITY_ATTRIBUTES | |
nLength As Long | |
lpSecurityDescriptor As LongPtr | |
bInheritHandle As Long | |
End Type | |
Private Declare Function MsgWaitForMultipleObjects Lib "user32" _ | |
(ByVal nCount As Long, pHandles As Long, _ | |
ByVal fWaitAll As Long, ByVal dwMilliseconds As Long, _ |
NewerOlder