This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <objbase.h> | |
#include <activscp.h> | |
#include <atomic> | |
#include <cassert> | |
#include <cstdio> | |
class ScriptSite : public IActiveScriptSite | |
{ | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple mixins in C++. Thomas Lang, 2018. | |
#include <iostream> | |
#include <list> | |
namespace { | |
// add const reference to type. | |
template<typename T> | |
struct add_cref : std::add_lvalue_reference<std::add_const<T> > {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//用Windows Media Foundation将任何Windows支持的音频文件转换成MP3格式文件,仅限Windows 8(NT6.2)及以上操作系统。 | |
#include<new> | |
#include<iostream> | |
#include<string> | |
#include<locale.h> | |
#include<Windows.h> | |
#include<mfapi.h> | |
#include<mfidl.h> | |
#include<Shlwapi.h> | |
#pragma comment(lib,"mfplat.lib") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// :copyright: (c) 2017 Alex Huszagh. | |
// :license: MIT. | |
/** | |
* Cartesian product algorithm. | |
* | |
* Lazily calculates the cartesian product from a container of containers, | |
* of either linear (array, vector, set, unordered_set) or associative | |
* (map, unordered_map, multimap, unordered_multimap) containers. | |
* | |
* The code can be used as follows: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> // 標準入出力 | |
#include <tchar.h> // TCHAR対応 | |
static long g_lLock = 0; // ロック | |
#include "Unknown.h" // Unknownの宣言 | |
static CUnknown g_Unknown; // Unknownオブジェクト | |
HMODULE g_hModule = NULL; | |
extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved){ | |
g_hModule = hinstDLL; | |
return TRUE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C/C++ Common | |
#include <cstdio> | |
#include <map> | |
// Windows | |
#include <windows.h> | |
class __declspec( uuid( "3D48D1EB-1EA5-4D4B-8411-4C0B8DF72CD7" ) ) ITestClass : public IUnknown | |
{ | |
protected: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Lock/Unlock Session by the "computer using rule". | |
Support versions >= Windows 7 | |
https://gist.github.com/taeguk/13b607f42020981f6cf9 | |
*/ | |
#include <windows.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <Wtsapi32.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// build with g++ -std=c++14 -O2 -Wall -Wextra -pedantic -static -o excel_dispatch_client excel_dispatch_client.cpp -lole32 -luuid | |
#include <cstdlib> | |
#include <iostream> | |
#include <exception> | |
#include <memory> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <unordered_map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <Strsafe.h> | |
#include <vector> | |
#include <boost/align/aligned_allocator.hpp> | |
typedef boost::alignment::aligned_allocator<void, 4> aligned_allocator; | |
class buffer | |
{ | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include "ccom.h" | |
// In order to use from VBScript, you need to place the progID in the registry so | |
// that it can be used to obtain the CLSID of this class. | |
// VB script | |
/* | |
DIM X | |
DIM Y | |
SET X = CREATEOBJECT( "BrlsMath.Math" ) |
NewerOlder