Skip to content

Instantly share code, notes, and snippets.

@kumatti1
kumatti1 / hoge.c
Last active Aug 28, 2015
IEのURL取得
View hoge.c
//#define CINTERFACE
#include <exdisp.h>
#include <windows.h>
#include <Objbase.h>
#include <Shlwapi.h>
void hoge()
{
IShellWindows *psw;
View Module1.bas
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 Mar 2, 2014
VBAでサブクラス化
View Module1.bas
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 Aug 29, 2015
nanacoにログイン
View nanaco.vbs
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 Apr 9, 2014
(Ctrl+c)キー送信した際の挙動
View Mese.cpp
#include <windows.h>
int CALLBACK WinMain(
_In_ HINSTANCE hInstance,
_In_ HINSTANCE hPrevInstance,
_In_ LPSTR lpCmdLine,
_In_ int nCmdShow
)
{
MessageBoxA(nullptr, "A", "A", MB_OK);
View xp_IPropertyStore.cpp
#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 Apr 22, 2014
pSHStgOpenStorageW
View unDocmented.cpp
#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 Aug 29, 2015
文字列連結
View CRT.DEF
LIBRARY CRT
EXPORTS
CRTfunc
@kumatti1
kumatti1 / Module2.bas
Last active Aug 29, 2015
検索ボックスにセット
View Module2.bas
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
エクスプローラ制御
View exp_.cpp
#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(