public FormRmsDocumentInspector()
        {
            InitializeComponent();

            SafeNativeMethods.IpcInitialize();

            propertyParser = null;
            doExpandCollapsePropertiesUI(false);    // initially collapsed
        }
        public FormRmsDocumentInspector()
        {
            InitializeComponent();

            SafeNativeMethods.IpcInitialize();

            propertyParser = null;
            doExpandCollapsePropertiesUI(false);    // initially collapsed
        }
        // tries to parse all document properties, getting authorization if we can, but otherwise
        // gracefully falls back to just getting public properties

        private void collectDocumentProperties(string file)
        {
            byte[] fileLicense;
            SafeInformationProtectionKeyHandle keyHandle;

            fileLicense = SafeFileApiNativeMethods.IpcfGetSerializedLicenseFromFile(file);

            keyHandle = null;

            try
            {
                keyHandle = SafeNativeMethods.IpcGetKey(fileLicense, false, false, true, this);
            }
            catch
            {
            }

            propertyParser = new RmsPropertyParser(fileLicense, keyHandle);
        }
        // tries to parse all document properties, getting authorization if we can, but otherwise
        // gracefully falls back to just getting public properties

        private void collectDocumentProperties(string file)
        {
            byte[]                              fileLicense;
            SafeInformationProtectionKeyHandle  keyHandle;

            fileLicense = SafeFileApiNativeMethods.IpcfGetSerializedLicenseFromFile(file);

            keyHandle = null;

            try
            {
                keyHandle = SafeNativeMethods.IpcGetKey(fileLicense, false, false, true, this);
            }
            catch
            {
            }

            propertyParser = new RmsPropertyParser(fileLicense, keyHandle);
        }