EnableFeature Method
Description
Enables or disables specified features in Microsoft Office Project Server 2003 using the Project Server security object.
Syntax
Function EnableFeature( _
ByVal lFeatureID As Long, _
ByVal fEnable As Long _
) As Long
Parameters
Parameter | Description |
---|---|
lFeatureID |
Required Long. The ID of the feature to enable or disable. The ID value is from WSEC_FEA_ACT_ID in the MSP_WEB_SECURITY_FEATURES_ACTIONS table, where WSEC_IS_ACTION = 0. |
fEnable |
Required Long. Set to 1 (True) to enable; set to 0 (False) to disable. |
Return Value
The EnableFeature method returns HRESULT as a Long (4-byte integer) value.
Remarks
For the feature names, see the MSP_WEB_SECURITY_FEATURES_ACTIONS table description in the Docs\PJSVRDB.HTM file on the Project Server 2003 CD, or in the installation directory [Program Files]\Microsoft Office Project Server 2003\HELP\[LCID]\PJSVRDB.HTM, where [LCID] is the Locale ID of the Project Server installation (English is 1033).
Example
The following example disables feature ID 1100. The example is for Microsoft Visual Basic 6.0.
Dim lResult as Long
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
lResult = oSec.EnableFeature(1100, 0)
Set oSec = Nothing