Skip to content

Instantly share code, notes, and snippets.

/*
CThemeFontForControl.h
zlib License:
Copyright (c) 2016 Egtra
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
@egtra
egtra / ndiscap-netsh.cpp
Created April 17, 2016 12:09
"netsh trace start caputre=yes traceFile=D:\packet.etl"の再現
/*
Copyright © 2016 Egtra
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@egtra
egtra / FileDescriptorTest-File-with-Path-WPF.cpp
Last active August 29, 2015 14:23
CFSTR_FILEDESCRIPTORで実在しないファイル(相対パスでフォルダ名指定あり)をエクスプローラへドラッグ&ドロップする実験 (WPF)
#define UNICODE
#define _UNICODE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#include <string.h>
@egtra
egtra / FileDescriptorTest-Directory-WPF.cpp
Created May 24, 2015 08:31
CFSTR_FILEDESCRIPTORで実在しないフォルダをエクスプローラへドラッグ&ドロップする実験 (WPF)
#define UNICODE
#define _UNICODE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#include <string.h>
@egtra
egtra / FileDescriptorTest-Directory-Forms.cpp
Created May 24, 2015 08:30
CFSTR_FILEDESCRIPTORで実在しないフォルダをエクスプローラへドラッグ&ドロップする実験 (Windows Forms)
#define UNICODE
#define _UNICODE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#include <string.h>
@egtra
egtra / FileDescriptorTest-Directory.cpp
Last active August 29, 2015 14:21
CFSTR_FILEDESCRIPTORで実在しないフォルダをエクスプローラへドラッグ&ドロップする実験
#define UNICODE
#define _UNICODE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#define _ATL_NO_AUTOMATIC_NAMESPACE
@egtra
egtra / FileDescriptorTest-Forms-MemStream-Multiple-Async-FTM.cpp
Created May 18, 2015 19:38
非同期ドロップ処理フリースレッドマーシャラー + CFSTR_FILEDESCRIPTORで複数ファイル (Windows Forms + SHCreateMemStream)
#define UNICODE
#define _UNICODE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#include <string.h>
@egtra
egtra / FileDescriptorTest-MemStream-Multiple-Async-FTM.cpp
Created May 18, 2015 19:36
非同期ドロップ処理フリースレッドマーシャラー + CFSTR_FILEDESCRIPTORで複数ファイル (SHCreateMemStream)
#define UNICODE
#define _UNICODE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#define _ATL_NO_AUTOMATIC_NAMESPACE
@egtra
egtra / git_ptr.hpp
Created September 28, 2014 16:20
Global Interface Tableのラッパー
/*
git_ptr.hpp: Copyright 2014 Egtra
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
@egtra
egtra / osname.cpp
Created September 15, 2014 16:23
Linuxディストリビューションの名前を収集してみるテスト
#include <iostream>
#include <fstream>
#include <sstream>
#include <functional>
#include <string>
#include <system_error>
#include <cerrno>
#include <boost/algorithm/string/trim.hpp>
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/stream.hpp>