I have some C++ Win32 code that I want to call from Ruby. But the code needs to be set up like this
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
otherwise things don't work right when I try creating windows and stuff. I don't know how to do that with a Ruby extension.
What can I do? Is there some routine I can call from main()
to set up the process so my win32 api calls work right?
Edit: (mostly) solved. see my answer.