Not a nice solution but I decided to give an empty managed object to the class. It seems to function, but to me a strange solution!
Is there a better way? Could I avoid repeated "gcnew somehow!"?
#include < msclr/lock.h >
using namespace msclr;
ref class lockRef{
static lockRef^ _lockRef;
}
void * thisClass::fo(){
lockRef^ x = gcnew lockRef(); lock l(x)
:::::
}