2009-03-13から1日間の記事一覧
#include <windows.h> #include "ruby.h" static VALUE ruby_path(VALUE self) { HMODULE hModule; char path[_MAX_PATH]; hModule = GetModuleHandleA(NULL); GetModuleFileNameA(hModule, path, _MAX_PATH); return rb_str_new2(path); } __declspec(dllexport) void </windows.h>…