C Examples: DbiGetNetUserName

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

C Examples: DbiGetNetUserName

Return to chapter overview

Get the network user name.

If there is no network, this function returns NONE as the user. This example uses the following input:
         fDbiGetNetUserName(UserName);

DBIResult fDbiGetNetUserName(pCHAR NetName)

{

   DBIResult      rslt;

   rslt = Chk(DbiGetNetUserName(NetName));

   if (rslt == DBIERR_INVALIDHNDL)

   {

      strcpy(NetName, "NONE");

      rslt = DBIERR_NONE;

   }

   else

      Chk(rslt);

   return rslt;

}