Problem with GetUserNameEx failing for NameDnsDomain type. HelpNeeded.

D

developer28

Hi,

I am trying to use the function GetUserNameEx on Win2k Pro.

It works for NameSamCompatible but is failing when i pass the option
as NameDnsDomain.

Important : The failure occurs only Win2000 Professional and it works
fine on XP.

In my case, following is the environment:

UserName : aman
Domain : banvsg.com

I need to use NameDnsDomain name to get the expanded domain name.

A call to GetUserNameEx with NameSamCompatible as option returns banvsg
\aman.

A call to GetUserNameEx with NameDnsDomain name returns a blank string
when i expect it to return banvsg.com\aman .

I also tried TranslateName to convert from NameSamCompatible type to
NameDnsDomain type but even that returns a blank string.

If anyone has expertise on this or has faced the issue before and
knows how to get through it, please reply.

I hope the MVP's out there would be knowing for sure what the issue
is.

Thanks for any help.

Regards,
Aman.
 

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

Top