i have an OCX written in MS C++ 6 that i am using in VB6
it works fine but when i load multiple instances of the OCX, say 2 on a vb form the global variables are shared between the two of them. here is an example:
in the ControlNameCtl.cpp file if i have:
int SomeFunction(short param1)
now if i load two OCX's and i call SomeFunction on the first,it will return 1 [expected]
and then if i call SomeFunction on the second OCX it will return 2 [unwanted]
i tried using the static keyword but i had no luck with that.
Thank you for your help,