
e1e369d2300aeb6fc82384359e0c5365.ppt
- Количество слайдов: 44
e. Directory™ Programming with Visual Basic and Active. X www. novell. com Dr. Wolfgang Schreiber Novell Worldwide Developer Support Novell, Inc. wschreiber@novell. com
Vision…one Net A world where networks of all types—corporate and public, intranets, extranets, and the Internet—work together as one Net and securely connect employees, customers, suppliers, and partners across organizational boundaries Mission To solve complex business and technical challenges with Net business solutions that enable people, processes, and systems to work together and our customers to profit from the opportunities of a networked world
Deployed Versions Novell e. Directory™ and Novell Directory Services® (NDS®) Product Version Build Version Platforms Net. Ware 5. 1 SP 4 (NDS 7) DS. nlm v 7. 57 Net. Ware 5. 1 SP 4 (NDS 8) DS. nlm v 8. 79 Net. Ware 5. 1 e. Directory 8 DS. nlm & DS. dlm v 8. 79 Net. Ware 5. 0, Win NT/2 K e. Directory 8. 5. x DS v 85. 23 Net. Ware 5. x, Win, Solaris Net. Ware 6 (e. Directory 8. 6) DS. nlm v 10110. 20 Net. Ware 6 e. Directory 8. 6. 1 DS v 10210. 43 NW 5. 1, NW 6, Win, Solaris, Linux Net. Ware 6 SP 1 (e. Directory 8. 6. 2) DS. nlm v 10310. 17 Net. Ware 6 e. Directory 8. 6. 2 DS v 103 xx. xx NW 5. 1, NW 6, Win, Solaris, Linux e. Directory 8. 7 DS v 10410. xx NW 5. 1, NW 6, Win, Solaris, Linux, AIX
Differences between e. Directory and Novell Directory Services (NDS) NDS e. Directory NOS directory focused on managing Net. Ware® servers A cross-platform, scalable, standards-based directory used for managing identities that span all aspects of the network—e. Directory is the foundation for e. Business Net. Ware 5 Net. Ware 6
Why Novell Controls for Active. X? • The ability to manage a network determines whether your network will increase—or cut into—your productivity • Novell Controls for Active. X support full access to e. Directory and are packaged for quick and easy use in Windows development tools
Purpose of this Session • Review e. Directory programming options for Visual Basic (VB) • Part I: Active. X controls 4 Introduce the controls and a simple application • Part II: Low-level APIs 4 Introduce the. DLL interface
Scope of this Session • Review existing Novell controls • Prerequisites for using. OCX controls • Deploying applications • Review a simple e. Directory application • Integration with VB • Alternative: Low-level programming • Frequent support questions
Prerequisites • Platform 4 Windows 9 x, Windows NT, Windows 2000 • Novell Client 32™ • Net. Ware server (except for peer-to-peer controls)
Where to Get… • The Active. X controls 4 developer. novell. com/ndk • The VB libraries 4 developer. novell. com/ndk • The current Novell client 4 www. novell. com/download
Where to Get… • Sample code 4 Comes with the controls 4 Downloadable separately • developer. novell. com/ndk 4 Novell Developer Support samples • developer. novell. com/support
Where to Get… • Further information 4 Developer Notes • www. novell. com/research/ 4 Developer. Net® University • developer. novell. com/education 4 Novell e. Directory Developer’s Guide • Novell Press
Where to Get… • Help 4 Online help 4 HTML documentation 4 News group • news: //developer-forums. novell. com – novell. devsup. activex – novell. devsup. vblib – novell. devsup. nds-client
Installing the Controls • OCX. EXE is self-extracting 4 Installs the controls 4 Installs documentation 4 Installs sample files
Available Controls: Overview
Directory Controls • NWDir. OCX 4 Novell Directory Control • NWDir. Q. DLL 4 Novell Directory Query Control • NWDir. A. OCX 4 Novell Directory Administration Control • NWSec. Str. OCX 4 Novell Secret. Store® Control
Directory Controls (cont. ) • NWIDir. OCX 4 Novell Internet Directory Control • Supports LDAP v 2. x • NWIDir. Q. DLL 4 Novell Internet Directory Query Control • Supports LDAP v 2. x and v 3. x • NWCat. A. OCX 4 Novell Catalog Administration Control
User and Group Administration • NWUsr. Grp. OCX 4 Novell User Group Control
Server and File System Controls • NWSrv. A. OCX 4 Novell Server Administration Control • NWVol. A. OCX 4 Novell Volume Administration Control
Session Administration Control • NWSess. OCX 4 Novell Session Control
Bindery Access • NWBind. OCX 4 Novell Bindery Control
Print Controls • NWPQA. OCX 4 Novell Print Queue Administration Control • NWPSA. OCX 4 Novell Print Server Administration Control • NWDPPtr. A. OCX 4 Novell NDPS Printer Administration Control
Application Administration • NWApp. A. OCX 4 Novell Application Administration Control
Transport Controls • NWCli. Skt. OCX 4 Novell Client Socket Control • NWSrv. Skt. OCX 4 Novell Server Socket Control • NWPr. Skt. OCX 4 Novell Peer Socket Control
Visual Controls • NWBrowse. OCX 4 Novell Browser Control • NWSelect. OCX 4 Novell Network Selector Control
Browser Control: List View
Selector Control: Details View
Compiler Implementations • Visual Basic • VB for Applications (e. g. , Excel) • Delphi • C++ Builder • Active Server Pages (ASP)
Code Review: My First e. Directory Application • Get e. Directory user information 4 User name 4 Current container 4 Current tree • List e. Directory objects in current container • Read an e. Directory attribute
Sample VB Script • Get some e. Directory information Private Sub Command. Buttone. Directory. Info_Click() Text. Box 1. Text = NWDir 1. Login. Name Text. Box 2. Text = NWDir 1. Full. Name Text. Box 3. Text = NWDir 1. Tree. From. Full. Name( _ NWDir 1. Full. Name) End Sub
Sample VB Script (cont. ) • List e. Directory objects in current container Private Sub Command. Button. Browse_Click() Dim entry As NWEntry List. Box 1. Clear For Each entry In NWDir 1. Entries List. Box 1. Add. Item(entry. Short. Name) Next End Sub
Sample VB Script (cont. ) • Read an e. Directory attribute Private Sub Command. Button. Surname_Click() Dim e As NWEntry Set e = NWDir 1. Find. Entry(NWDir 1. Login. Name) Text. Box 4. Text = e. Get. Field. Value("Surname") End Sub
Demo: VB Script in Office Applications
Part II: Calling Low-Level APIs • Novell Developers Kit (NDK) contents 4 Libraries 4 Documentation 4 Sample code and help
NDK Contents for VB Developers • Libraries 4 Novell Libraries for Visual Basic • Documentation and help 4 Same as in C Libraries • Sample code 4 NDK samples 4 Developer Support samples
VB: May I Call You DLL? • Behind the scenes (NETWARE. TXT) Declare Function NWCCGet. Conn. Info Lib "clxwin 32" ( By. Val conn. Handle As Long, By. Val info. Type As Long, By. Val len 1 As Long, buffer As Any) As Long
VB: Code Fragments c. Code = NWCCGet. Conn. Info (conn, _ NWCC_INFO_SERVER_VERSION, _ 20, buffer) c. Code = NWCCGet. Conn. Info (conn, _ NWCC_INFO_SERVER_NAME, _ 256, buffer)
VB: Frequent Code Lines Dim c. Code Dim ds. Code Dim ctx c. Code ds. Code as NWCCODE as NWDSContext. Handle = NWCalls. Init(nil, nil) = NWDSCreate. Context. Handle(ctx)
Demo: Low-Level APIs in Office Applications
Frequent Questions • Performance 4 How do the controls perform? 4 The “For each…” statement • Contradicting declarations 4 The “NWEntry” problem • Changing multi-valued attributes
Frequent Questions (cont. ) • Low-level APIs 4 Should 4 Can I use Active. X or low-level? I combine Novell's OCXs with low-level APIs?
Frequent Questions (cont. ) • Novell Active. X controls in office applications • Deploying applications 4 What files are required? 4 Copyright issues 4 ASP issues 4 Internet Explorer vs. Netscape
Summary Novell Controls for Active. X support full access to e. Directory, packaged for quick and easy use in Windows development tools
e1e369d2300aeb6fc82384359e0c5365.ppt