Many thanks.
I am using this code to set the security parameter like this..
CoSetProxyBlanket(pReptGen, // pointer to enumerator
RPC_C_AUTHN_WINNT, // authentication service
RPC_C_AUTHZ_NONE, // authorization service
NULL, // server principle name
RPC_C_AUTHN_LEVEL_CALL, // authentication level
RPC_C_IMP_LEVEL_IMPERSONATE, // impersonation level
NULL, // identity of the client
EOAC_NONE); // capability flags
Here pReptGen is my object which I have created using CoCreateInstance.
Is it ok now??