Skip to content

Instantly share code, notes, and snippets.

@kumatti1
kumatti1 / Module4.bas
Created May 19, 2014 22:34
エクスプローラでのパス列挙
Option Explicit
Sub hoge3()
Dim o As Shell32.FolderItems3
Dim v As Shell32.FolderItem2
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
Option Explicit
Private WithEvents d As Shell32.ShellFolderViewOC
Private WithEvents ie As SHDocVw.InternetExplorer
Private flg As Boolean
Private Sub d_EnumDone()
flg = True
Debug.Print "d_EnumDone"
End Sub
Private Sub ie_DocumentComplete(ByVal pDisp As Object, URL As Variant)
@kumatti1
kumatti1 / Monitor.vb
Last active August 29, 2015 14:04
モニタ名取得
Imports ServiceLibrary
Module Module1
Sub Main()
Dim objPenent As New CEDID
For i As UShort = 0 To 32
Dim objChild As New CEDID.CEDID_V1_Block
@kumatti1
kumatti1 / Color.vb
Last active August 29, 2015 14:04
色調整したいねん(・∀・)
Imports ServiceLibrary
'gfxSrvc.dll
Module Module1
Sub Main()
Dim objPenent As New CEDID
For i As UShort = 0 To 32
@kumatti1
kumatti1 / com.cpp
Created July 24, 2014 22:24
COM氏
//#define UNICODE
#import "igfxsrvc.exe"
#include <windows.h>
#include <stdio.h>
#include <comdef.h>
using namespace IGFXSRVCLib;
void GetName()
{
@kumatti1
kumatti1 / hoge.vb
Created July 27, 2014 22:16
おなじやった(・∀・)
Imports ServiceLibrary
'gfxSrvc.dll
Module Module1
Sub Main()
Dim objChild As New CDisplayConfig.CDeviceInfo
Dim objPenent As New CDisplayConfig
@kumatti1
kumatti1 / Test_SetColor.vb
Last active August 29, 2015 14:04
色調整すんねん(・∀・)
Imports ServiceLibrary
'gfxSrvc.dll
Module Module1
Sub Main()
Dim objPenent As New CEDID
For i As UShort = 0 To 32
@kumatti1
kumatti1 / SetColor.cpp
Last active August 29, 2015 14:04
COM版SetColor
//#define UNICODE
#import "igfxsrvc.exe"
#include <windows.h>
#include <stdio.h>
#include <comdef.h>
using namespace IGFXSRVCLib;
void GetName()
{
@kumatti1
kumatti1 / ReadMe.mc
Last active August 29, 2015 14:05
MCCS
MCCSによる設定
MCCSクラスのGetVCPCurrentMaxMinValueの戻り値でどの設定が使えるか判断出来る。
MSのAPIと挙動が似てるのでどちらもMCCSて事なのかなと。
factory_defaultプロシージャを呼び出す際、GetVCPCurrentMaxMinValueで得られた最大値を
SetVCPValueで指定する事で工場出荷時設定に戻せる。
(こちらの環境だと65535)
@kumatti1
kumatti1 / Module1.bas
Last active August 29, 2015 14:05
VBAでGetName
Option Explicit
Private Declare Function DispCallFunc Lib "oleaut32" _
(ByVal pvInstance As Long, ByVal oVft As Long, _
ByVal cc As Long, ByVal vtReturn As Integer, _
ByVal cActuals As Long, prgvt As Integer, _
prgpvarg As Long, pvargResult As Variant) As Long
Const CC_STDCALL = 4
Sub hoge()
Dim objEDID As stdole.IUnknown