Partager via


Interop layer for AD RMS SDK 2.0 - OR - How do I rights-enable my managed code project?

Hi folks,

There is a lot of great work that is happening to support and enable AD RMS in the developer tools space.

This developer's corner blog post will get you started with our new interop sample that allows you to rights-enable your managed code (ex. C#) applications.

Check it out and feel free to pass the word on to any of your friends and associates who might be interested in developing AD RMS applications.

Thanks,
Dan

...

Hi Developers,

I was recently giving a talk about the AD RMS SDK 2.0, when one of the attendees asked me:

“So, how do I use your SDK from C#?”

When I told him that our SDK was native-only, he vowed:

“Managed or death!!”

Hyperbole aside, the point was taken and I’m happy to announce that we’ve now released an AD RMS SDK 2.0 Interop Library in the form of sample code. You can drag/drop this layer into your C# application and use it to directly invoke methods on MSIPC.dll.

The library is structured to map as closely to the native API as possible to make it easy to use the existing RMS SDK 2.0 API reference. Every function exposed in the native API now maps to a static methods in the SafeNativeMethods class. 

For example:

 Before (C++)

 HRESULT hr = IpcInitialize();

if (FAILED(hr)) {

     // error --failed to initialize MSIPC.dll

}

 

After (C#)

// throws exception on error

SafeNativeMethods.IpcInitialize();

 

Other functions convert similarly. Of course, if you have any questions, you can always get answers quickly at our connect site.

 

Happy RMS’ing, managed coders!

Thanks,
Duncan