Game Development Community

NOWINBASEINTERLOCK preprocessor definition issues

by Playware · in Torque Game Engine Advanced · 04/23/2009 (8:23 pm) · 3 replies

Hi,

I need to use InterlockedIncrement and InterlockedDecrement functions defined in winbase.h. The problem is these functions are only defined if the NOWINBASEINTERLOCK is not defined. In Torque, NOWINBASEINTERLOCK is defined in preprocessor definitions. So, these Interlocked... functions become unknown identifiers.

Removing that definition from preprocessor definitions solved my issue.

I want to know how could this affect to the engine and wonder it can introduce some odd results.

Thanks

#1
04/23/2009 (8:57 pm)
It shouldn't cause any problem. All it really does is prevent those function declarations from being included, in case you want to provide your own implementations. So as long as you don't get any build errors you should be golden.

Actually using them is another matter, but removing the pre-processor directive shouldn't hurt anything.

#2
04/24/2009 (5:49 am)
I've removed that define long ago and I've never seen any problems.
#3
04/29/2009 (9:34 pm)
I see. Thanks.