Skip to content

Instantly share code, notes, and snippets.

@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 / 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 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 / Mese.cpp
Created April 9, 2014 23:09
(Ctrl+c)キー送信した際の挙動
#include <windows.h>
int CALLBACK WinMain(
_In_ HINSTANCE hInstance,
_In_ HINSTANCE hPrevInstance,
_In_ LPSTR lpCmdLine,
_In_ int nCmdShow
)
{
MessageBoxA(nullptr, "A", "A", MB_OK);
@kumatti1
kumatti1 / xp_IPropertyStore.cpp
Created April 21, 2014 23:04
XPでIPropertyStore
#define Microsoft_Office_Metadata_Handler L"{993BE281-6695-4BA5-8A2A-7AACBFAAB69E}"
#define Microsoft_Office_Thumbnail_Handler L"{C41662BB-1FA0-4CE0-8DC5-9B7F8279FF97}"
#define FilePath L"実際のパス"
#include <windows.h>
#include <ObjIdl.h>
#include <Propsys.h>
#include <Shlwapi.h>
#include <comdef.h>
#include <Propvarutil.h>
@kumatti1
kumatti1 / unDocmented.cpp
Created April 22, 2014 23:22
pSHStgOpenStorageW
#define FilePath L"実際のパス"
#include <windows.h>
#include <ObjIdl.h>
#include <Propsys.h>
#include <Shlwapi.h>
#include <comdef.h>
#include <Propvarutil.h>
_COM_SMARTPTR_TYPEDEF(IPersistFile, __uuidof(IPersistFile));
@kumatti1
kumatti1 / CRT.DEF
Last active August 29, 2015 14:01
文字列連結
LIBRARY CRT
EXPORTS
CRTfunc
@kumatti1
kumatti1 / Module2.bas
Last active August 29, 2015 14:01
検索ボックスにセット
Option Explicit
Sub hoge2()
Dim Shl As Shell32.Shell
Dim Win As InternetExplorer
Const StrPath As String = "C:\Temp"
Set Shl = New Shell32.Shell
For Each Win In Shl.Windows
If Win.FullName Like "*\Explorer.EXE" Then
If Win.document.Folder.Self.Path = (StrPath) Then
@kumatti1
kumatti1 / exp_.cpp
Created May 18, 2014 23:26
エクスプローラ制御
#include <Windows.h>
#include <Shlwapi.h>
#include <Shlobj.h>
#include <Shobjidl.h>
#include <Propkey.h>
#include <comdef.h>
_COM_SMARTPTR_TYPEDEF(IFolderView, __uuidof(IFolderView));
_COM_SMARTPTR_TYPEDEF(IFolderView2, __uuidof(IFolderView2));
_COM_SMARTPTR_TYPEDEF(IShellWindows, __uuidof(IShellWindows));
int CALLBACK WinMain(