Skip to content

Instantly share code, notes, and snippets.

@kumatti1
kumatti1 / hoge.cpp
Last active August 29, 2015 14:10
Google検索
#include <Exdisp.h>
#import <shdocvw.dll>
#import <mshtml.tlb>
#define URL L"https://www.google.co.jp/?gws_rd=ssl"
HRESULT test()
{
HRESULT hr = S_OK;
try{
@kumatti1
kumatti1 / Module1.bas
Created December 24, 2014 22:25
CoGetApartmentType
Option Explicit
Private Declare PtrSafe Function CoGetApartmentType Lib "Ole32" (pAptType As Long, pAptQualifier As Long) As Long
Sub hoge()
Dim arg1&, arg2&, hr&
hr = CoGetApartmentType(arg1, arg2)
Debug.Print Hex$(hr), arg1, arg2
@kumatti1
kumatti1 / Module1.bas
Created December 28, 2014 23:26
VBA_Test
Option Explicit
Declare PtrSafe Function DispInvoke Lib "OleAut32" _
(ByVal arg1 As LongPtr, _
ByVal arg2 As LongPtr, _
ByVal arg3 As Long, _
ByVal arg4 As Integer, _
arg5 As Any, _
arg6 As Variant, _
arg7 As Any, _
@kumatti1
kumatti1 / Module1.bas
Created January 11, 2015 23:57
Yahoo!
Option Explicit
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
Private Declare PtrSafe _
@kumatti1
kumatti1 / hoge.cpp
Last active August 29, 2015 14:16
IHTMLDocument2からのSystem::Windows::Forms::HtmlDocument変換
#include <Exdisp.h>
#import <shdocvw.dll>
#import <mshtml.tlb>
#using <System.Windows.Forms.dll>
using namespace System;
using namespace System::Windows::Forms;
using namespace System::Reflection;
using namespace System::Runtime::InteropServices;
@kumatti1
kumatti1 / hoge.cpp
Created March 2, 2015 03:28
iGPU色調整
#include <windows.h>
#using <C:\\Windows\\System32\\gfxSrvc.dll>
#using <System.Windows.Forms.dll>
using namespace System;
using namespace System::Windows::Forms;
using namespace System::Reflection;
using namespace System::Runtime::InteropServices;
@kumatti1
kumatti1 / Module1.bas
Last active January 8, 2021 04:19
FindFirstFileExWでFindExSearchLimitToDirectories、やっぱり使えないわな
Option Explicit
Const FIND_FIRST_EX_LARGE_FETCH = 2& 'Win7以降
Const FindExInfoStandard = 0&
Const FindExInfoBasic = 1& 'Win7以降
Const FindExSearchLimitToDirectories = 1&
Private Declare PtrSafe Function FindFirstFileExW Lib "kernel32" _
(ByVal lpFileName As LongPtr, _
@kumatti1
kumatti1 / hoge.cpp
Created March 6, 2015 23:31
FindFirstFileTransacted
#define UNICODE
#include <windows.h>
#include <KtmW32.h>
#pragma comment(lib, "KtmW32.lib")
int CALLBACK WinMain(
_In_ HINSTANCE hInstance,
_In_ HINSTANCE hPrevInstance,
_In_ LPSTR lpCmdLine,
@kumatti1
kumatti1 / hoge.cpp
Created March 12, 2015 22:40
IHTMLWindow2からのIAccessible取り出し
#define UNICODE
#include <windows.h>
#include <Shlwapi.h>
#include <oleacc.h>
#include <Exdisp.h>
#import <shdocvw.dll>
#import <mshtml.tlb>
#define URL L"https://www.google.co.jp/?gws_rd=ssl"
_COM_SMARTPTR_TYPEDEF(IAccessible, __uuidof(IAccessible));
@kumatti1
kumatti1 / hoge.cpp
Created March 13, 2015 23:10
IHTMLInputElementからのIHTMLWindow2取り出し
#include <Exdisp.h>
#import <shdocvw.dll>
#include <mshtml.h>
#import <mshtml.tlb>
#include <Shlwapi.h>
#define URL L"https://www.google.co.jp/?gws_rd=ssl"
HRESULT test()
{