Net Use Command vs Win32 API

  • Thread starter Thread starter Michael C.
  • Start date Start date
M

Michael C.

I am trying to write a program that maps certain shared drives. I would
prefer to use a Win32 API call from my program, as I can more easily
parse the error and report it to the end user. However, I noticed that
using the NET USE command would give me slightly different results in
the registry.

Primarily, I'm trying to determine what the difference is between the
value of "4" and "1" for:

HKEY_CURRENT_USER\Network\<drive letter>
DeferFlags

The API sets DeferFlags to "1", while XP's NET USE sets it to "4". What
is the meaning of the value of "4"?

I have also noticed that in Windows 2000, this DWORD value is not
present; why?

Thank you for your assistance.
 
Back
Top