Autor Thema: how to get the server name and the number of the mailboxes with C/C++ API ?  (Gelesen 1118 mal)

Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
I have a server task and I need to get the number of the mailboxes from the server.

It is ok if the Address Book has just one server; the problems appears when I have 2 or more servers on same domain because the search on AddressBook returns Nothing

With C/C++ API the LNDatabase.GetServer() (which returns the server name on a DB resides) returns NULL if the DB resides on the current server). The LNNotesSession.GetUserName() gets the nameserver from the ID, but if there are more than 1 ID on a workstation it returns the value from the last ID accessed.

Is another solution to get the server name and the number of the mailboxes ?

Offline eknori

  • @Notes Preisträger
  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 11.728
  • Geschlecht: Männlich
I use to use the following lines to retrieve the server name

//*================================================
//* Get ServerName
//* ================================================
STATUS         error;
char szServer[MAXUSERNAME+1];
error = SECKFMGetUserName (szServer);

Egal wie tief man die Messlatte für den menschlichen Verstand auch ansetzt: jeden Tag kommt jemand und marschiert erhobenen Hauptes drunter her!

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz