I’m trying to export data to excel from my C++ program, using
embedded ruby & WIN32OLE (since I have no idea how to do it from
C++). Somehow WIN32OLE prevents my program
from exiting, and also leaves Excel process running on (EXCEL.EXE shows
in task manager).
Here is my attempt to reproduce the error in minimal amount of code:
=== c++ code
int main(int argc, char* argv)
rb_require("./test.rb"); return 0;
app = WIN32OLE.new(“Excel.Application”)
I’m using Win2000, Excel 2000, Ruby 1.6.6, Win32ole 0.4.8, MS VC++ 6.0
I tested Word also - same behaviour.
I tried calling rb_exit(0) at the end of my program, however even
though it remedied this particular problem, it also broke uninitialization
of some libraries I’m using and therfore introduced memory leaks.
Tomek ‘Alva’ Wroblewski (email@example.com)