How to set COAUTHIDENTITY properly?

Hi all,
anybody has experience with COAUTHIDENTITY? I can't seem to get the values correct :(
My code is shown below:
ZeroMemory(&coAuthIdentity, sizeof(coAuthIdentity));
    coAuthIdentity.Password = (unsigned short*)"password";     coAuthIdentity.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;     coAuthIdentity.User = (unsigned short*)"hfyap";     coAuthIdentity.UserLength = 4;     cout<<coAuthIdentity.User<<endl;     cout<<coAuthIdentity.Password<<endl;
When it prints out, I get 0043F46C and 0043F460 no matter what kind of values I put in.
What I want to create is to make the OPC server and client connect to each other remotely. I have been having problems configuring this on winxp sp2 even after following the white paper on changing the dcom configs so i figured that I'd try to create same local user accounts on the pcs that the server and client are situated (They are not in any domain). That means I have to use COAUTHIDENTITY correct?
Btw, in dcomcnfg, when I set the properties for the OPC server, I chose connect for authentication level and user as eg. pc_name\local_user. On the OPC client side, I also chose connect for authentication lvl, user as eg. pc_name2\local_user.
I have practically gave access and launch permissions, both locally and remotely to administrators, everyone, system, users, local user, anonymous_logon on both pcs as a desperate bid to connect remotely. I have also ensure that OPCenum, the server and client, DCOM port are placed in exceptions in windows firewall respectively.
What am I doing wrong? I'll appreciate any help given, thanks. Btw, anybody has a copy of DrDCOM by Iconics? It seems it is good to use and Iconics no longer feature in their free tools.
Atiz
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
The solution to this is here:
http://groups.google.com.sg/group/microsoft.public.platformsdk.com_ole/browse_thread/thread/f0d8a3938345e5c0/fcdfc2f22e0dbfcc?hl=en#fcdfc2f22e0dbfcc
But I'm still having problems configuring the client to connect to server remotely. Hope someone can help me, thx!
Atiz
Atiz wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.