Just pass an lvalue of type bool
:
ObjectIDGenerator ^generator;
Object ^o;
bool isFirst;
generator->GetID(o, isFirst);
There are no lambdas involved. The reason for your error is that you must have stuck [Out]
somewhere in your code, which looked to the compiler like a lambda. But [Out]
is never used when calling a function.