NPGetHomeDirectory

This function is used to determine the home or personal directory associated with a user's account on a given network. Since the user's home directory is a typical place to store their User Profile (per-user registry settings), the directory should be one which the user (and network administrators) can write to, but which other users cannot write to.


DWORD NPGetHomeDirectory(
  LPTSTR lpDirectory,
  LPDWORD lpBufferSize
  );

lpDirectory

Points to a buffer to receive the directory path. This will be either in UNC or drive-relative form, whichever is supported by the network.

lpBufferSize

This is used to specify the size of the buffer passed in. If the call fails because the buffer is not big enough, this location is used to return the required buffer size.

WN_NOT_LOGGED_ON

The user is not logged on to this network.

WN_NOT_SUPPORTED

The network does not support home directories, or the user does not have a home directory.

WN_MORE_DATA

The buffer is too small.