Click to See Complete Forum and Search --> : NetWkstaGetInfo retruns NERR_WkstaNotStarted in XP


ackabacka
January 13th, 2006, 06:33 AM
Hi,

In my Gina I need to call NetWkstaGetInfo(LPWKSTA_INFO_100) to find out if and what domain the computer belongs to (via LsaQueryInformationPolicy()).

The problem is that in XP (no problems in Win2K) it returns NERR_WkstaNotStarted (The Workstation service has not been started) when my gina calls it after a reboot (just before showing its logon dlg).

If I lock the desktop, then my gina can call NetWkstaGetInfo() just fine but perhaps more interesting is that even if I log out, my gina is able to call NetWkstaGetInfo().

So, it seems that as soon as the Workstation service is started, calling NetWkstaGetInfo() is OK. And logging out doesn't stop the Workstation service. But before I've logged on for the first time after reboot, the Workstation service is not up and running.

How can I solve this?!
Is there a way to in my gina force the Workstation service to start earlier?
Is there another way to get information about what domain the computer belongs to (before loggin on for the first time)?
etc!

And again, in Win2K, the problem doesn't exist.


Anyone?