Skip to content

Instantly share code, notes, and snippets.

@kumatti1
kumatti1 / Brightness.cpp
Created January 2, 2014 09:19
DDC/CI確認
#define UNICODE
#include <HighLevelMonitorConfigurationAPI.h>
#include <Windows.h>
#include <stdio.h>
int CALLBACK WinMain(
_In_ HINSTANCE hInstance,
_In_ HINSTANCE hPrevInstance,
_In_ LPSTR lpCmdLine,
_In_ int nCmdShow
@kumatti1
kumatti1 / ナンバーズ.vbs
Last active January 2, 2016 08:29
みずほダイレクトでナンバーズ4購入
Dim ie
Const url = "https://cp.mizuhobank.co.jp/lucky_p_secure/p02001"
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.navigate url
While ie.busy Or ie.readyState <> 4
WScript.Sleep (100)
@kumatti1
kumatti1 / Module1.bas
Created January 11, 2014 11:16
Intel
Sub hoge()
'IGFXEXTLib
''C:\Windows\system32\igfxext.exe
Dim unk As IUnknown 'ICUIExternal2
' Set unk = New CUIExternal
Set unk = CreateObject("IgfxExt.CUIExternal.1")
MsgBox unk Is Nothing
End Sub
@kumatti1
kumatti1 / _SetBrightness.cpp
Last active January 4, 2016 01:49
IntelのCOM
#import "igfxsrvc.exe"
#include <windows.h>
#include <stdio.h>
using namespace IGFXSRVCLib;
void _SetBrightness()
{
try {
@kumatti1
kumatti1 / Module1.bas
Last active August 29, 2015 13:56
asm
Option Explicit
Function CallFunc(ByVal p As LongPtr, ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As LongPtr
Debug.Print Hex$(hWnd)
End Function
@kumatti1
kumatti1 / Module1.bas
Created March 1, 2014 09:30
Excel 2013 x64/Win8.1用SetWindowSubclassのサブクラス化VBAコード
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
@kumatti1
kumatti1 / Module1.bas
Created March 2, 2014 00:09
VBAでサブクラス化
Option Explicit
Function CallFunc(ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As LongPtr
Debug.Print Hex$(hWnd)
End Function
@kumatti1
kumatti1 / nanaco.vbs
Last active August 29, 2015 13:57
nanacoにログイン
Option Explicit
Dim ie
Const ID =
Const PW =
Const url = "https://www.nanaco-net.jp/pc/emServlet"
Set ie = CreateObject("InternetExplorer.Application")
@kumatti1
kumatti1 / UserForm1.frm
Created March 21, 2014 00:03
IEで同期オブジェクト
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
@kumatti1
kumatti1 / Module1.bas
Created March 21, 2014 23:25
SetTimerで同期オブジェクト
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, _