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.

104 lines
2.8 KiB

  1. Attribute VB_Name = "Globals"
  2. Option Explicit
  3. Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
  4. Public Declare Function GetUserDefaultLCID Lib "kernel32" () As Long
  5. Public Const LB_SELECTSTRING = &H18C
  6. Public g_AuthDatabase As AuthDatabase.Main
  7. Public g_ErrorInfo As CErrorInfo
  8. Public g_Font As StdFont
  9. Public g_intFontColor As Long
  10. Public Const FILE_EXT_HHC_C As String = ".HHC"
  11. Public Const FILE_EXT_HHK_C As String = ".HHK"
  12. Public Const FILE_EXT_XLS_C As String = ".XLS"
  13. Public Const FILE_EXT_CHM_C As String = ".CHM"
  14. Public Const FILE_EXT_HTM_C As String = ".HTM"
  15. Public Const FILE_EXT_HHT_C As String = ".HHT"
  16. Public Enum SEARCH_TARGET_E
  17. ST_TITLE_E = &H1
  18. ST_URI_E = &H2
  19. ST_DESCRIPTION_E = &H4
  20. ST_COMMENTS_E = &H8
  21. ST_BASE_FILE_E = &H10
  22. ST_TOPICS_WITHOUT_KEYWORDS_E = &H20
  23. ST_NODES_WITHOUT_KEYWORDS_E = &H40
  24. ST_SELF_AUTHORING_GROUP_E = &H80
  25. ST_MARK1_E = &H100
  26. ST_BROKEN_LINK_WINME_E = &H200
  27. ST_BROKEN_LINK_STD_E = &H400
  28. ST_BROKEN_LINK_PRO_E = &H800
  29. ST_BROKEN_LINK_PRO64_E = &H1000
  30. ST_BROKEN_LINK_SRV_E = &H2000
  31. ST_BROKEN_LINK_ADV_E = &H4000
  32. ST_BROKEN_LINK_ADV64_E = &H8000
  33. ST_BROKEN_LINK_DAT_E = &H10000
  34. ST_BROKEN_LINK_DAT64_E = &H20000
  35. End Enum
  36. Public LocIncludes() As String
  37. Public Sub InitializeLocIncludes()
  38. Static blnInitialized As Boolean
  39. If (blnInitialized) Then
  40. Exit Sub
  41. End If
  42. blnInitialized = True
  43. ReDim LocIncludes(2)
  44. LocIncludes(0) = LOC_INCLUDE_ALL_C
  45. LocIncludes(1) = LOC_INCLUDE_ENU_C
  46. LocIncludes(2) = LOC_INCLUDE_LOC_C
  47. End Sub
  48. Public Sub PopulateCboWithSKUs( _
  49. ByVal i_cbo As ComboBox, _
  50. Optional ByVal blnListCollectiveSKUs As Boolean = False _
  51. )
  52. Dim intIndex As Long
  53. Dim SKUs() As SKU_E
  54. If (blnListCollectiveSKUs) Then
  55. ReDim SKUs(11)
  56. Else
  57. ReDim SKUs(8)
  58. End If
  59. SKUs(0) = SKU_STANDARD_E
  60. SKUs(1) = SKU_PROFESSIONAL_E
  61. SKUs(2) = SKU_PROFESSIONAL_64_E
  62. SKUs(3) = SKU_SERVER_E
  63. SKUs(4) = SKU_ADVANCED_SERVER_E
  64. SKUs(5) = SKU_DATA_CENTER_SERVER_E
  65. SKUs(6) = SKU_ADVANCED_SERVER_64_E
  66. SKUs(7) = SKU_DATA_CENTER_SERVER_64_E
  67. SKUs(8) = SKU_WINDOWS_MILLENNIUM_E
  68. If (blnListCollectiveSKUs) Then
  69. SKUs(9) = SKU_DESKTOP_ALL_E
  70. SKUs(10) = SKU_SERVER_ALL_E
  71. SKUs(11) = SKU_ALL_E
  72. End If
  73. For intIndex = LBound(SKUs) To UBound(SKUs)
  74. i_cbo.AddItem DisplayNameForSKU(SKUs(intIndex)), intIndex
  75. i_cbo.ItemData(intIndex) = SKUs(intIndex)
  76. Next
  77. i_cbo.ListIndex = 0
  78. End Sub
  79. Public Sub SetFontInternal(i_frm As Form)
  80. SetFont i_frm, g_Font, g_intFontColor
  81. End Sub