Actually you need to use NetWkstaUserGetInfo (in NETAPI32.DLL).
NT only.
On Win95, you need totally different code.
Alas, there's 16-bit APIs but you usually want this info in a 32-bit program.
MS' answer is to use the thunk compiler to make 32-bit code that can call the
appropriate 16-bit APIs.
I never needed it that bad (yet) to bother.
- Howard
Quote:
> Try the NetWkstaGetInfo() API.
> --
> Paul Little, Software Engineer
> > I believe GetDCName returns the name of the Domain controller (Primary?)
> > which is the main server on your network. There must be a API for the
> > domain name, but I haven't found it - if anyone knows .... please tell.
> > Kev.
> > > Does anyone know how to get the domain name in visual C++. I tried the
> > > GetDCName function but it didn't seem to return to me the domain name.
> > > Could some one offer any examples would be greatly appreciated.
> > > Robert A. Thompson
--
----------------------------------------------------------------------
----------------------------------------------------------------------
Never confuse motion for action. -- Benjamin Franklin
----------------------------------------------------------------------
In the Information Age, the first step to sanity is FILTERING.
Filter the information; extract the knowledge.
-Zetetic Commentaries, Kira Evans
----------------------------------------------------------------------