Share via


Protected Document Library Sample Classes and Functions

The document library sample is written in a combination of C# and unmanaged C++. The C# code is the main wrapper for the program: it corresponds with the server, handles the Web page for the document library, encrypts the document, and also wraps the unmanaged C++ Active Directory Rights Management Services (AD RMS) functions needed to create a issuance license.

The sample includes the following classes and methods.

Class Description
Rmhdoc Class Controls the document store project.
Nmc Class Returns managed values from unmanaged functions.
RMSWsrv Class Wraps SOAP proxy objects and methods.
Crypto Class Handles all cryptographic functions for the sample.
RmhStore Class Represents a document store.
StoreRights, Dacl, Ace, Sid, Right, and User Classes Converts rights stored by access control lists (ACLs) into XrML rights.

The C# code also calls into an unmanaged DLL, called Cdoclib.dll, which is written in C++. The C++ DLL handles compound file creation and management. The code to create this DLL is included in the cdoclib project of the solution, which can be found in the Cdoclib folder.

See Also

Compound Files
Protected Document Library Sample

Send comments about this topic to Microsoft

Build date: 3/13/2008