How to set the 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.User = (unsigned short*)"hfyap";
coAuthIdentity.UserLength = 4;

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.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question