Created
October 11, 2012 22:40
-
-
Save kumatti1/3875998 to your computer and use it in GitHub Desktop.
otukare.cpp
This file contains hidden or 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> | |
void main() | |
{ | |
HMODULE hDll = GetModuleHandleW(L"kernel32.dll"); | |
FARPROC ptr = GetProcAddress(hDll,"OutputDebugStringW"); | |
VARIANTARG varArgs; | |
varArgs.vt = VT_I8; | |
varArgs.llVal = (LONGLONG)L"hoge\n"; | |
LPVARIANTARG pVarArgs = &varArgs; | |
VARTYPE vtTmp = VT_I8; | |
VARIANT v; | |
VariantInit(&v); | |
DispCallFunc(nullptr,(ULONG_PTR)ptr,CC_STDCALL,VT_EMPTY,1,&vtTmp,&pVarArgs,&v); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment