Skip to content

Instantly share code, notes, and snippets.

@kumatti1
kumatti1 / hoge.cpp
Last active September 23, 2015 21:46
APIフック
#define UNICODE
#include <windows.h>
#include <stdio.h>
DWORD OldProtect;
BYTE tmp[6];
BYTE ByteAsm[6];
DWORD * pFunc;
@kumatti1
kumatti1 / hoge.c
Last active August 28, 2015 21:43
IEのURL取得
//#define CINTERFACE
#include <exdisp.h>
#include <windows.h>
#include <Objbase.h>
#include <Shlwapi.h>
void hoge()
{
IShellWindows *psw;
@kumatti1
kumatti1 / hoge.cpp
Created July 20, 2015 21:30
インラインアセンブラ
#include <windows.h>
void WINAPI hoge();
FARPROC func = (FARPROC)&hoge;
int CALLBACK WinMain(
_In_ HINSTANCE hInstance,
_In_ HINSTANCE hPrevInstance,
_In_ LPSTR lpCmdLine,
_In_ int nCmdShow
@kumatti1
kumatti1 / Module1.bas
Created July 3, 2015 22:04
マウスカーソル直下の要素を取得
'目的の要素を選択
Sub Main()
Application.OnTime Now + TimeSerial(0, 0, 2), "GetSub"
End Sub
@kumatti1
kumatti1 / Module1.bas
Created June 30, 2015 20:49
OutputDebugStringW
Option Explicit
Private Declare Function OutputDebugStringW Lib "kernel32.dll" (ByVal lpOutputString As LongPtr) As LongPtr
Sub hoge()
Dim ret As LongPtr
ret = OutputDebugStringW(StrPtr("あいうえお"))
MsgBox ret
@kumatti1
kumatti1 / Module3.bas
Created June 20, 2015 21:00
E_INVALIDARG
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&
@kumatti1
kumatti1 / Module2.bas
Created June 19, 2015 22:09
InitVariantFromInt32Array
Private Declare PtrSafe _
Function InitVariantFromInt32Array Lib "Propsys" ( _
ByRef prgn As Any, _
ByVal cElems As Long, _
ByRef pvar As Variant _
) As Long
Sub hoge()
Dim hr&
@kumatti1
kumatti1 / Module3.bas
Last active August 29, 2015 14:23
ミュート設定2
Option Explicit
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
@kumatti1
kumatti1 / Module1.bas
Created June 17, 2015 21:03
ミュート設定
Option Explicit
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
@kumatti1
kumatti1 / Module2.bas
Last active August 29, 2015 14:23
途中まで
Option Explicit
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type