Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
875 B

  1. #define GENNAME_NO_ERROR 0
  2. #define GENNAME_TEMPLATE_INVALID 1
  3. #define GENNAME_COUNTER_TOO_HIGH 2
  4. #define GENNAME_VARIABLE_MISSING 3
  5. #define GENNAME_NAME_TOO_LONG 4
  6. #define GENNAME_VARIABLE_USERNAME L"USERNAME"
  7. #define GENNAME_VARIABLE_FIRSTNAME L"USERFIRSTNAME"
  8. #define GENNAME_VARIABLE_LASTNAME L"USERLASTNAME"
  9. #define GENNAME_VARIABLE_MAC L"MAC"
  10. typedef struct _GENNAME_VARIABLES {
  11. PWSTR UserName;
  12. PWSTR FirstName;
  13. PWSTR LastName;
  14. PWSTR MacAddress;
  15. DWORD Counter;
  16. BOOL AllowCounterTruncation;
  17. } GENNAME_VARIABLES, *PGENNAME_VARIABLES;
  18. DWORD
  19. GenerateNameFromTemplate (
  20. IN PWSTR Template,
  21. IN PGENNAME_VARIABLES Variables,
  22. IN PWSTR Name,
  23. IN DWORD NameLength,
  24. OUT PWSTR *MissingVariable OPTIONAL,
  25. OUT BOOL *UsedCounter OPTIONAL,
  26. OUT DWORD *MaximumGeneratedNameLength OPTIONAL
  27. );