Friday, August 2, 2002 07:34 AM
If I understand what u want is to invoke the main method of C++ from Java. I did this in my way if it works for u that will be good. What i did was I created a dll in in c++ and loaded in java. From java I am invoking the Native method called.See the code below.
JNIEXPORT void JNICALL Java_Native_Hello(JNIEnv *env, jobject obj)
int k = WinMain(hcur,hpre,cmdline,cmshow);
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
while (GetMessage(&msg, NULL, 0, 0))
The parameters I passed to WinMain(hcur,hpre,cmdline,cmshow)
are declared globally in c++. This worked for me hope it will work for u too.