Skip to content

Instantly share code, notes, and snippets.

@kumatti1
kumatti1 / hoge.cpp
Created January 1, 2016 23:44
リンク出来た(`・ω・´)ゞ
#include <windows.h>
#include <Shlobj.h>
#pragma comment(lib,"ole32.lib")
#pragma comment(lib,"user32.lib")
#pragma comment(lib,"shell32.lib")
#pragma comment(lib,"shdocvw.Lib")
extern "C" HRESULT __stdcall SHGetIDispatchForFolder(
ITEMIDLIST *pidl,
@kumatti1
kumatti1 / hoge.cpp
Created January 2, 2016 22:01
GetProcessHandleFromHwndは、Hookから。
#include <windows.h>
#include <Shlobj.h>
#include <Exdisp.h>
#pragma comment(lib,"oleacc.lib")//自前
#pragma comment(lib,"ole32.lib")
#pragma comment(lib,"user32.lib")
#pragma comment(lib,"shell32.lib")
#pragma comment(lib,"shdocvw.Lib")//自前
@kumatti1
kumatti1 / Module1.bas
Created January 2, 2016 23:09
DPI取得
Option Explicit
Private Declare PtrSafe _
Function GetWindowDPI Lib "user32.dll" ( _
ByVal hwnd As LongPtr _
) As Long
Sub hoge()
@kumatti1
kumatti1 / hoge.cpp
Created January 5, 2016 23:00
ウィザード起動
#include <windows.h>
#include <stdio.h>
#include <comdef.h>
#pragma comment(lib,"ole32.lib")
#pragma comment(lib,"user32.lib")
#define ss L"Microsoft.Display"
interface IUnk : public IUnknown
{
@kumatti1
kumatti1 / UserForm1.frm
Created January 7, 2016 08:06
WebBrowser非表示
Option Explicit
Private Declare PtrSafe _
Function WindowFromAccessibleObject Lib "oleacc.dll" ( _
ByVal pacc As IAccessible, _
hwnd As Any _
) As Long
Private Declare PtrSafe _
Function ShowWindow Lib "user32.dll" ( _
@kumatti1
kumatti1 / UserForm1.frm
Created January 7, 2016 08:08
WebBrowser1透過失敗
Option Explicit
Private Declare PtrSafe _
Function SetWindowCompositionAttribute Lib "user32.dll" ( _
ByVal hwnd As LongPtr, _
st As Any _
) As Long
Private Declare PtrSafe _
@kumatti1
kumatti1 / Module1.bas
Created January 23, 2016 04:12
Explorer検索
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 _
@kumatti1
kumatti1 / Module1.bas
Last active January 8, 2021 02:28
Explorerのファイル選択
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 _
@kumatti1
kumatti1 / Module1.bas
Last active January 8, 2021 02:27
WinHttpとIPersistStreamInit
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
Last active January 8, 2021 02:27
試行錯誤中
Option Explicit
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type