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
@ECHO OFF | |
REM Windowsの場合は cmdファイルで ffmpeg.exeにパスを通す必要があります。 | |
REM 元のファイルは削除されます。 | |
SET TMPFILE="%TEMP%\%~n1.mp4" | |
ffmpeg -i %1 -i %2 -c copy %TMPFILE% | |
DEL %1 %2 | |
MOVE %TMPFILE% "%~dpn1.mp4" | |
PAUSE |
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
/* | |
モニターを省電力モードに。 | |
cl sleep_monitor.c | |
*/ | |
// SendMessage,Sleep関数のため、kernel32.lib,user32.libをリンク | |
#pragma comment(lib,"kernel32.lib") | |
#pragma comment(lib,"user32.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
/******************************************************** | |
簡単なスレッドプールサンプル | |
********************************************************/ | |
#pragma comment(lib,"comsuppw.lib") | |
#define _WIN32_WINNT 0x0600 | |
#include <windows.h> | |
#include <tchar.h> | |
#include <cstdio> | |
#include <comutil.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
#pragma comment(lib,"comsuppw.lib") | |
#include <windows.h> | |
#include <process.h> | |
#include <conio.h> | |
#include <comutil.h> | |
#include <cstdio> | |
#include <cstring> | |
#include <tchar.h> | |
#include <clocale> |
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
/************************************************************************ | |
>> cl /DUNICODE /D_UNICODE io_completion_port_vista.cpp | |
*************************************************************************/ | |
#pragma comment(lib,"comsuppw.lib") | |
#pragma warning( disable : 6387 ) | |
#include <windows.h> | |
#include <comutil.h> | |
#include <cstdio> | |
#include <cstring> |
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
// 疑似 sudo | |
//fake-sudo.exe | |
#include <windows.h> | |
#include <strsafe.h> | |
int main(int argc,char **argv) | |
{ | |
if(argc >= 2) | |
{ |
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
/* | |
compiler command line : | |
cl /LD MyServer.cpp /link /TLBOUT:MyServer.tlb | |
*/ | |
#define STRICT | |
#ifndef _WIN32_WINNT | |
#define _WIN32_WINNT 0x0400 | |
#endif | |
#define _ATL_ATTRIBUTES |
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
<?xml version="1.0" encoding="Shift-JIS"?> | |
<job id="myScript"> | |
<script type="text/jscript"> | |
<![CDATA[ | |
try | |
{ | |
var obj = new ActiveXObject("MyServer.Utility.1"); | |
WScript.Echo(obj.CurrentDirectory()); | |
} | |
catch(e) |
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
#pragma comment(lib,"user32.lib") | |
#pragma comment(lib,"comsuppw.lib") | |
#pragma warning( disable : 4100 4101) | |
#include <windows.h> | |
#include <comdef.h> | |
class CMyObject : public IDispatch | |
{ | |
private: |
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
#pragma comment(lib,"comsuppw.lib") | |
#pragma warning( disable : 4100 4101) | |
#include <windows.h> | |
#include <ActivScp.h> | |
#include <comdef.h> | |
//スクリプトで公開するオブジェクト名 | |
#define SCRIPT_OBJECT_NAME L"Message" | |
/* |