Problem with C/C++ when using MQ_INVALID_HANDLE

I am using C binding for OpenMQ.

In my C or C++ program, I have the following:

MQPropertiesHandle propertiesHandle;

propertiesHandle = MQ_INVALID_HANDLE;

I will get compile error:

error C2059: syntax error : '{'

But If I change the above into following I will not get he error:

MQPropertiesHandle propertiesHandle = MQ_INVALID_HANDLE;

I need the first method to separately define the variable in one function and initialize it in other function. Can any body tell me what's wrong with the first method and how to cope with it.

[584 byte] By [tekwiser] at [2007-11-26 9:56:32]
# 1
This is because MQ_INVALID_HANDLE is a struct constant. Please see mqtypes.hMQPropertiesHandle invalidh = MQ_INVALID_HANDLEMQPropertiesHandle hanle;handle.handle = invalidh.handle
ak at 2007-7-7 1:19:13 > top of Java-index,Application & Integration Servers,Sun Java System Message Queue...
# 2
or simplyhandle = invalidh
ak at 2007-7-7 1:19:13 > top of Java-index,Application & Integration Servers,Sun Java System Message Queue...