Leaked source code of windows server 2003
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.

61 lines
889 B

  1. SET QUOTED_IDENTIFIER ON
  2. GO
  3. SET ANSI_NULLS ON
  4. GO
  5. CREATE FUNCTION fn_BuildDumpPath(
  6. @i_instance as bigint,
  7. @i_build as int,
  8. @i_suffix as varchar (50)
  9. )
  10. RETURNS varchar(256)
  11. AS
  12. BEGIN
  13. DECLARE @Path as varchar(256)
  14. DECLARE @hexpath as varchar (30)
  15. DECLARE @dig as int
  16. SET @hexpath = ''
  17. while (@i_instance != 0)
  18. BEGIN
  19. SET @dig = @i_instance % 16
  20. IF @dig < 10
  21. BEGIN
  22. SET @hexpath = CAST(@dig as varchar(1)) + @hexpath
  23. END
  24. ELSE
  25. BEGIN
  26. SET @hexpath = CAST(CAST((@dig + 0x41 - 10) as varbinary(1))
  27. as varchar) + @hexpath
  28. END
  29. set @i_instance = CAST (@i_instance / 16 as int)
  30. END
  31. SET @Path = '\\tkwucdfsa02\whistlerbeta\archived\' +
  32. CAST(@i_build as varchar(6)) + '\' +
  33. @hexpath + @i_suffix
  34. return (@Path)
  35. END
  36. GO
  37. SET QUOTED_IDENTIFIER OFF
  38. GO
  39. SET ANSI_NULLS ON
  40. GO