Code Search for Developers
 
 
  

AdsProp.h from bccSDK at Krugle


Show AdsProp.h syntax highlighted

//+----------------------------------------------------------------------------
//
//  Windows NT Active Directory Service Property Pages
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1992-1999.
//
//  File:       adsprop.h
//
//  Contents:   Functions and definitions used in the creation of AD property
//              sheets.
//
//  History:    28-Sept-98 Eric Brown created.
//
//-----------------------------------------------------------------------------

#ifndef _ADSPROP_H_
#define _ADSPROP_H_

#ifdef __BORLANDC__
#pragma option push -b -a8 -pc -A- /*P_O_Push*/
#endif

#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif

#define WM_ADSPROP_NOTIFY_PAGEINIT   (WM_USER + 1101) // where LPARAM is the PADSPROPINITPARAMS pointer.
#define WM_ADSPROP_NOTIFY_PAGEHWND   (WM_USER + 1102) // where WPARAM => page's HWND and LPARAM => page's Title
#define WM_ADSPROP_NOTIFY_CHANGE     (WM_USER + 1103) // used to send a change notification to a parent sheet
#define WM_ADSPROP_NOTIFY_APPLY      (WM_USER + 1104) // pages send this to the notification object.
#define WM_ADSPROP_NOTIFY_SETFOCUS   (WM_USER + 1105) // used internally by the notification object.
#define WM_ADSPROP_NOTIFY_FOREGROUND (WM_USER + 1106) // used internally by the notification object.
#define WM_ADSPROP_NOTIFY_EXIT       (WM_USER + 1107) // sent on page release
#define WM_ADSPROP_NOTIFY_ERROR      (WM_USER + 1110) // used to send the notification object an error message

//+----------------------------------------------------------------------------
//
//  Structure:  ADSPROPINITPARAMS
//
//  Usage:      Used to pass page initialization information to new pages from
//              the notify object.
//
//-----------------------------------------------------------------------------
typedef struct _ADSPROPINITPARAMS {
    DWORD              dwSize;          // Set this to the size of the struct.
    DWORD              dwFlags;         // Reserved for future use.
    HRESULT            hr;              // If this is non-zero, then the others
    IDirectoryObject * pDsObj;          // should be ignored.
    LPWSTR             pwzCN;
    PADS_ATTR_INFO     pWritableAttrs;
} ADSPROPINITPARAMS, * PADSPROPINITPARAMS;

//+----------------------------------------------------------------------------
//
//  Structure:  ADSPROPERROR
//
//  Usage:      Used to pass page error information to the notify object
//
//-----------------------------------------------------------------------------
typedef struct _ADSPROPERROR {
    HWND               hwndPage;        // The HWND of the page that had the error
    PWSTR              pszPageTitle;    // The title of the page that had the error
    PWSTR              pszObjPath;      // Path to the object that the error occurred on
    PWSTR              pszObjClass;     // Class of the object that the error occurred on
    HRESULT            hr;              // If this is non-zero, then the others
                                        // pszError will be ignored
    PWSTR              pszError;        // An error message.  Used only if hr is zero
} ADSPROPERROR, * PADSPROPERROR;

//+----------------------------------------------------------------------------
//
//  Function:   ADsPropCreateNotifyObj
//
//  Synopsis:   Checks to see if the notification window/object exists for this
//              sheet instance and if not creates it.
//
//  Arguments:  [pAppThdDataObj] - the unmarshalled data object pointer.
//              [pwzADsObjName]  - object path name.
//              [phNotifyObj]    - to return the notificion window handle.
//
//  Returns:    HRESULTs.
//
//-----------------------------------------------------------------------------
STDAPI
ADsPropCreateNotifyObj(LPDATAOBJECT pAppThdDataObj, PWSTR pwzADsObjName,
                       HWND * phNotifyObj);

//+----------------------------------------------------------------------------
//
//  Function:   ADsPropGetInitInfo
//
//  Synopsis:   Pages call this at their init time to retreive DS object info.
//
//  Arguments:  [hNotifyObj]  - the notificion window handle.
//              [pInitParams] - struct filled in with DS object info. This
//                              struct must be allocated by the caller before
//                              the call.
//
//  Returns:    FALSE if the notify window has gone away for some reason or
//              if the parameters are invalid.
//
//  Notes:      This call results in the sending of the
//              WM_ADSPROP_NOTIFY_PAGEINIT message to the notify window.
//              pInitParams->pWritableAttrs can be NULL if there are no
//              writable attributes.
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropGetInitInfo(HWND hNotifyObj, PADSPROPINITPARAMS pInitParams);

//+----------------------------------------------------------------------------
//
//  Function:   ADsPropSetHwndWithTitle
//
//  Synopsis:   Pages call this at their dialog init time to send their hwnd
//              to the Notify object.
//
//  Arguments:  [hNotifyObj]  - the notificion window handle.
//              [hPage]       - the page's window handle.
//              [ptzTitle]    - the page's title
//
//  Returns:    FALSE if the notify window has gone away for some reason.
//
//  Notes:      Sends the WM_ADSPROP_NOTIFY_PAGEHWND message to the notify
//              window. Use this function instead of ADsPropSetHwnd for
//              multi-select property pages
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropSetHwndWithTitle(HWND hNotifyObj, HWND hPage, PTSTR ptzTitle);

//+----------------------------------------------------------------------------
//
//  Function:   ADsPropSetHwnd
//
//  Synopsis:   Pages call this at their dialog init time to send their hwnd
//              to the Notify object.
//
//  Arguments:  [hNotifyObj]  - the notificion window handle.
//              [hPage]       - the page's window handle.
//
//  Returns:    FALSE if the notify window has gone away for some reason.
//
//  Notes:      Sends the WM_ADSPROP_NOTIFY_PAGEHWND message to the notify
//              window.
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropSetHwnd(HWND hNotifyObj, HWND hPage);

//+----------------------------------------------------------------------------
//
//  function:   ADsPropCheckIfWritable
//
//  Synopsis:   See if the attribute is writable by checking if it is in
//              the allowedAttributesEffective array.
//
//  Arguments:  [pwzAttr]        - the attribute name.
//              [pWritableAttrs] - the array of writable attributes.
//
//  Returns:    FALSE if the attribute name is not found in the writable-attrs
//              array or if the array pointer is NULL.
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropCheckIfWritable(const PWSTR pwzAttr, const PADS_ATTR_INFO pWritableAttrs);

//+----------------------------------------------------------------------------
//
//  function:   ADsPropSendErrorMessage
//
//  Synopsis:   Adds an error message to a list which is presented when
//              ADsPropShowErrorDialog is called
//
//  Arguments:  [hNotifyObj]  - the notificion window handle.
//              [pError]      - the error structure
//
//  Returns:    FALSE if the notify window has gone away for some reason.
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropSendErrorMessage(HWND hNotifyObj, PADSPROPERROR pError);

//+----------------------------------------------------------------------------
//
//  function:   ADsPropShowErrorDialog
//
//  Synopsis:   Presents an error dialog with the error messages accumulated
//              through calls to ADsPropSendErrorMessage
//
//  Arguments:  [hNotifyObj]  - the notificion window handle.
//              [hPage]       - the property page window handle.
//
//  Returns:    FALSE if the notify window has gone away for some reason.
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropShowErrorDialog(HWND hNotifyObj, HWND hPage);

#ifdef __cplusplus
}
#endif // __cplusplus

#ifdef __BORLANDC__
#pragma option pop /*P_O_Pop*/
#endif

#endif // _ADSPROP_H_




See more files for this project here

bccSDK

This project has a goal to provide complete port of latest MS Platform SDK along with some other commonly used separate SDK\'s for both older and newer Borland compilers. This includes headers, idl files and static and import lib files.

Project homepage: http://sourceforge.net/projects/bccsdk
Programming language(s): C,C++,IDL
License: mit

  atl/
  idl/
  wtl/
  ADSIid.h
  AF_Irda.h
  AccCtrl.h
  AclAPI.h
  AclUI.h
  ActivScp.h
  ActiveDS.h
  Admex.h
  Adptif.h
  AdsDb.h
  AdsErr.h
  AdsHlp.h
  AdsProp.h
  Adsnms.h
  Adssts.h
  AdtGen.h
  AgtCtl.h
  AgtCtl_i.c
  AgtErr.h
  AgtSvr.h
  AgtSvr_i.c
  AppAvCap.h
  AqAdmTyp.h
  AqErr.mc
  Asptlb.h
  AtalkWsh.h
  AuthZ.h
  Authif.h
  AviFmt.h
  BLBErr.h
  BaseTsd.h
  BaseTyps.h
  BatClass.h
  BiDiSpl.h
  Bits.h
  BitsMsg.h
  BluetoothAPIs.h
  CChannel.h
  CDONTS.h
  CDOSys.h
  CDOSysErr.h
  CDOSysStr.h
  CDOSys_I.c
  CGuid.h
  CatErr.mc
  CdErr.h
  CeLib.h
  CertAdm.h
  CertBCli.h
  CertBase.h
  CertCli.h
  CertEnc.h
  CertExit.h
  CertMod.h
  CertPol.h
  CertSrv.h
  CertView.h
  Certif.h
  ChPtrArr.h
  ChStrArr.h
  ChString.h
  ChanMgr.h
  CiError.h
  CluAdmEx.h
  ClusApi.h
  ClusCfgGuids.h
  ClusCfgServer.h
  ClusCfgWizard.h
  CmnQuery.h
  Codecs.h
  Color.Dlg
  ColorDlg.h
  ComAdmin.h
  ComCat.h
  ComDef.h
  ComSvcs.h
  CommCtrl.h
  CommCtrl.rh
  CommDlg.h
  CompObj.h
  ConfPriv.h
  CorReg.h
  Cpl.h
  Cplext.h
  CustCntl.h
  CustomAw.h
  DHtmldid.h
  DHtmled.h
  DHtmled.js
  DHtmled.vbs
  DHtmliid.h
  DSAdmin.h
  DSClient.h
  DSQuery.h
  DSRole.h
  DShow.h
  DataPath.h
  DbgEng.h
  DbgHelp.h
  DbgProp.h
  Dbt.h