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 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, _ | |
ByVal flAllocationType 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 | |
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 | |
Private Declare PtrSafe _ | |
Function SymInitialize Lib "imagehlp.dll" ( _ | |
ByVal FramesToSkip As LongPtr, _ | |
ByVal UserSearchPath As String, _ | |
ByVal fInvadeProcess As Long _ | |
) As Long | |
Private Declare PtrSafe _ |
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
Private Declare PtrSafe _ | |
Function InitVariantFromVariantArrayElem Lib "Propsys" ( _ | |
ByRef varIn As Any, _ | |
ByVal iElem As Long, _ | |
ByRef pvar As Variant _ | |
) As Long | |
Sub hoge() | |
Dim hr& |
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 | |
Private Const PAGE_EXECUTE_READWRITE = &H40 | |
Private Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" _ | |
(Destination As Long, Source As Long, ByVal Length As Long) | |
Private Declare Function VirtualProtect Lib "kernel32" (lpAddress As Long, _ | |
ByVal dwSize As Long, ByVal flNewProtect As Long, lpflOldProtect As Long) As Long | |
Private Declare Function GetModuleHandleA Lib "kernel32" (ByVal lpModuleName As String) As Long | |
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, _ | |
ByVal lpProcName As String) As Long | |
Private Declare Function DialogBoxParam Lib "user32" Alias "DialogBoxParamA" (ByVal hInstance 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 | |
Private Declare PtrSafe Function DoFileDownload Lib "ieframe.dll" (ByVal arg1 As LongPtr) As Long | |
Sub hoge() | |
DoFileDownload StrPtr("http://k.yimg.jp/images/top/sp2/cmn/logo-ns-131205.png") | |
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 | |
Declare Function ILCreateFromPathW& Lib "Shell32.dll" (ByVal pszPath&) | |
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, _ | |
ByVal cb As Long, _ | |
ByRef pvar As Variant _ |
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 Function ILCreateFromPathW& Lib "Shell32.dll" (ByVal pszPath&) | |
Private Declare Sub ILFree Lib "Shell32.dll" (ByVal pidl&) | |
Private Declare Function ILGetSize& Lib "Shell32.dll" (ByVal pidl&) | |
Private Declare _ | |
Function InitVariantFromBuffer Lib "propsys.dll" ( _ | |
ByVal pv As LongPtr, _ | |
ByVal cb As Long, _ | |
ByRef pvar As Variant _ |
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 GUID | |
Data1 As Long | |
Data2 As Integer | |
Data3 As Integer | |
Data4(0 To 7) As Byte | |
End Type |