home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / netz / netapi / examples / getseria.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-04-11  |  2.6 KB  |  57 lines

  1. {***************************************************************************}
  2. {** Program : GETSERIAL                                                   **}
  3. {***************************************************************************}
  4. {** Version : 1.0             ** Started :           ** Ended :           **}
  5. {***************************************************************************}
  6. {******************************** Description ******************************}
  7. {***************************************************************************}
  8. {** Example program to get the default file server's serial number        **}
  9. {**                                                                       **}
  10. {**                                                                       **}
  11. {**                                                                       **}
  12. {**                                                                       **}
  13. {**                                                                       **}
  14. {**                                                                       **}
  15. {**                                                                       **}
  16. {***************************************************************************}
  17. {******************************** Information ******************************}
  18. {***************************************************************************}
  19. {**                                                                       **}
  20. {**                                                                       **}
  21. {**                                                                       **}
  22. {**                                                                       **}
  23. {**                                                                       **}
  24. {**                                                                       **}
  25. {***************************************************************************}
  26.  
  27. PROGRAM GETSERIAL;
  28.  
  29. USES
  30.  
  31.  nwfsserv;
  32.  
  33. VAR
  34.  
  35.   SerialFunc        : FileServerOBJ;
  36.   SerialNumber      : LONGINT;
  37.   ApplicationNumber : WORD;
  38.   NetworkError      : WORD;
  39.  
  40. BEGIN
  41.  
  42.   SerialFunc.Init (true);
  43.   NetworkError := SerialFunc.GetNetworkSerialNumber (SerialNumber, ApplicationNumber);
  44.   IF NetworkError <> 0 THEN
  45.     WRITELN ('Could not read file server serial numbers !!')
  46.   ELSE
  47.     BEGIN
  48.  
  49.       WRITELN ('Netware Serial Number      : ', SerialFunc.HexString (SerialNumber, 8) );
  50.       WRITELN ('Netware Application Number : ', SerialFunc.HexString (ApplicationNumber, 4) );
  51.  
  52.     END;
  53.  
  54.   SerialFunc.Done;
  55.  
  56. END.
  57.