home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / ni_vb / nwbind.bas < prev    next >
BASIC Source File  |  1993-06-03  |  7KB  |  108 lines

  1. 'NWBIND.BAS  NetWare Bindery Services Interface for Visual Basic For Windows
  2. 'Version 1.0
  3. 'Novell Systems Research Department, Novell, Inc.
  4. 'Copyright (c) 1993, Novell, Inc.
  5. 'This interface is not supported through Novell's regular
  6. 'support channels.  See README.TXT for more information.
  7.  
  8. 'Bindery object types
  9. Global Const OT_WILD = -1               ' Matches any type
  10. Global Const OT_UNKNOWN = 0             ' Unknown object type
  11. Global Const OT_USER = 1                ' The object is a "user"
  12. Global Const OT_USER_GROUP = 2          ' A group of users
  13. Global Const OT_PRINT_QUEUE = 3         ' Services print queues
  14. Global Const OT_FILE_SERVER = 4         ' The object serves files
  15. Global Const OT_JOB_SERVER = 5
  16. Global Const OT_GATEWAY = 6
  17. Global Const OT_PRINT_SERVER = 7
  18. Global Const OT_ARCHIVE_QUEUE = 8
  19. Global Const OT_ARCHIVE_SERVER = 9      ' Services backup jobs
  20. Global Const OT_JOB_QUEUE = 10
  21. Global Const OT_ADMINISTRATION = 11
  22. Global Const OT_NAS_SNA_GATEWAY = 33
  23. Global Const OT_NACS = 35
  24. Global Const OT_REMOTE_BRIDGE_SERVER = 36
  25. Global Const OT_BRIDGE_SERVER = 38
  26. Global Const OT_TCPIP_GATEWAY = 39
  27. Global Const OT_GATE = 41
  28. Global Const OT_TIME_SYNCHRONIZATION_SERVER = 45
  29. Global Const OT_ARCHIVE_SRV = 46
  30. Global Const OT_ADVERTISING_PRINT_SERVER = 71
  31. Global Const OT_BTRIEVE_VAP_NLM_5XX = 75
  32. Global Const OT_SQL_VAP_NLM = 76
  33. Global Const OT_XTREE_NETWORK = 77
  34. Global Const OT_BTRIEVE_VAP_NLM_4XX = 80
  35. Global Const OT_APPLETALK_GATEWAY = 83
  36. Global Const OT_X25_GATEWAY = 88
  37. Global Const OT_WAN_COPY = 114
  38. Global Const OT_TES_NETWARE_VMS = 122
  39. Global Const OT_NETWARE_ACCESS_SERVER = 152
  40. Global Const OT_PORTABLE_NETWARE = 158
  41. Global Const OT_COMPAQ_IDA_STATUS_MONITOR = 172
  42. Global Const OT_NETWARE_386_SERVER = 263
  43. Global Const OT_CSA_MUX = 276
  44. Global Const OT_CSA_LCA = 277
  45. Global Const OT_CSA_CM = 278
  46. Global Const OT_CSA_SMA = 279
  47. Global Const OT_CSA_DBA = 280
  48. Global Const OT_CSA_NMA = 281
  49. Global Const OT_CSA_SSA = 282
  50. Global Const OT_CSA_STATUS = 283
  51. Global Const OT_CSA_APPC = 286
  52. Global Const OT_SNA_TEST = 294
  53. Global Const OT_CSA_TRACE = 298
  54. Global Const OT_COMMUNICATIONS_EXECUTIVE = 304
  55. Global Const OT_NNS_DOMAIN = 307
  56. Global Const OT_NNS_PROFILE = 309
  57. Global Const OT_NNS_QUEUE = 311
  58. Global Const OT_WORDPERFECT_NETWORK = -2184
  59.  
  60. ' Bindery security definitions
  61. Global Const BS_ANY_READ = &H0       ' Readable by anyone
  62. Global Const BS_LOGGED_READ = &H1    ' Must be logged in to read
  63. Global Const BS_OBJECT_READ = &H2    ' Readable by same object or super
  64. Global Const BS_SUPER_READ = &H3     ' Readable by supervisor only
  65. Global Const BS_BINDERY_READ = &H4   ' Readable only by the bindery
  66. Global Const BS_ANY_WRITE = &H0      ' Writeable by anyone
  67. Global Const BS_LOGGED_WRITE = &H10  ' Must be logged in to write
  68. Global Const BS_OBJECT_WRITE = &H20  ' Writeable by same object or super
  69. Global Const BS_SUPER_WRITE = &H30   ' Writeable only by the supervisor
  70. Global Const BS_BINDERY_WRITE = &H40 ' Writeable by the bindery only
  71.  
  72. ' Attributes of objects and properties in the bindery
  73. Global Const BF_STATIC = &H0
  74. Global Const BF_DYNAMIC = &H1
  75. Global Const BF_ITEM = &H0
  76. Global Const BF_SET = &H2
  77.  
  78. Type PROPERTY_VALUE
  79.     propertyValue As String * 128
  80. End Type
  81.  
  82. Declare Function AddBinderyObjectToSet Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal propertyName$, ByVal memberName$, ByVal memberType%) As Integer
  83. Declare Function ChangeBinderyObjectPassword Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal oldPassword$, ByVal newPassword$) As Integer
  84. Declare Function ChangeBinderyObjectSecurity Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal newObjectSecurity%) As Integer
  85. Declare Function ChangePropertySecurity Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal propertyName$, ByVal newPropertySecurity%) As Integer
  86. Declare Function CloseBindery Lib "NWNETAPI.DLL" () As Integer
  87. Declare Function CreateBinderyObject Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal objectFlag%, ByVal objectSecurity%) As Integer
  88. Declare Function CreateProperty Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal propertyName$, ByVal propertyFlags%, ByVal propertySecurity%) As Integer
  89. Declare Function DeleteBinderyObject Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%) As Integer
  90. Declare Function DeleteBinderyObjectFromSet Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal propertyName$, ByVal propertyName, ByVal memberName$, ByVal memberType%) As Integer
  91. Declare Function DeleteProperty Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal propertyName$) As Integer
  92. Declare Function GetBinderyAccessLevel Lib "NWNETAPI.DLL" (securityAccessLevel%, objectID&) As Integer
  93. Declare Function GetBinderyObjectDiskSpaceLeft Lib "NWNETAPI.DLL" (ByVal connectionID%, ByVal binderyObjectID%, systemElapsedTime&, unusedDiskBlocks&, restrictionEnforced%) As Integer
  94. Declare Function GetBinderyObjectID Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, objectID&) As Integer
  95. Declare Function GetBinderyObjectName Lib "NWNETAPI.DLL" (ByVal objectID&, ByVal objectName$, objectType%) As Integer
  96. Declare Function IsBinderyObjectInSet Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal propertyName$, ByVal memberName$, ByVal memberType%) As Integer
  97. Declare Function OpenBindery Lib "NWNETAPI.DLL" () As Integer
  98. 'propertyValue is a 128-byte array
  99. Declare Function ReadPropertyValue Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal propertyName$, ByVal segmentNumber%, propertyValue As PROPERTY_VALUE, moreSegments%, propertyFlags%) As Integer
  100. Declare Function RenameBinderyObject Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal newObjectName$, ByVal objectType%) As Integer
  101. Declare Function ScanBinderyObject Lib "NWNETAPI.DLL" (ByVal searchObjectName$, ByVal searchObjectType%, objectID&, ByVal objectName$, objectType%, objectHasProperties%, objectFlag%, objectSecurity%) As Integer
  102. Declare Function ScanBinderyObjectTrusteePaths Lib "NWNETAPI.DLL" (ByVal objectID&, ByVal volumeNumber%, sequenceNumber%, trusteeAccessMask%, ByVal trusteePathName$) As Integer
  103. Declare Function ScanProperty Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal searchPropertyName$, sequenceNumber&, ByVal propertyName$, propertyFlags%, propertySecurity%, propertyHasValue%, moreProperties) As Integer
  104. Declare Function VerifyBinderyObjectPassword Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal password$) As Integer
  105. 'propertyValue is a 128-byte array
  106. Declare Function WritePropertyValue Lib "NWNETAPI.DLL" (ByVal objectName$, ByVal objectType%, ByVal propertyName$, ByVal segmentNumber%, propertyValue As PROPERTY_VALUE, ByVal moreSegments%) As Integer
  107.  
  108.