Forum Discussion

chandrashekharazad's avatar
chandrashekharazad
Copper Contributor
Aug 30, 2019

Error while using “IpcCreateLicenseFromTemplateId” function in RMS SDK 2.1

Hi,

I am using RMS client 2.1 SDK to apply protection on PDF file.

Client has provided us with template ID.

But when I try to use the function "IpcCreateLicenseFromTemplateId" I get error 

“The System cannot find the file specified. HRESULT: 0x80070002”.

****************************************************************************************

string viewAndPrint = "xxxxx-xxxx-xxx-xxxx-xxxxxxxx";

//Error in thisline

SafeInformationProtectionLicenseHandle handle = SafeNativeMethods.IpcCreateLicenseFromTemplateId(viewAndPrint);

 

SafeNativeMethods.IpcSetLicenseUserRightsList(handle, userRights);

SafeNativeMethods.IpcSetLicenseValidityTime(handle, term);

 

string encryptedFilePath = SafeFileApiNativeMethods.IpcfEncryptFile(
filePath,
handle,
SafeFileApiNativeMethods.EncryptFlags.IPCF_EF_FLAG_KEY_NO_PERSIST,
true,false,true,null,symmetricKeyCred);

****************************************************************************************

Help me solve this error.

 

 

    • chandrashekharazad's avatar
      chandrashekharazad
      Copper Contributor
      Esaggese I wasn't able to find the solution for the error yet. Raised a request with Azure support. They have sent the request to backend team to analyse it.
    • Tom_Moser's avatar
      Tom_Moser
      Icon for Microsoft rankMicrosoft

      Esaggese It's different than MIP SDK. I don't have any experience with RMS SDK to be very helpful, but if I had to guess I'd say that the file path is invalid or the client hasn't bootstrapped and downloaded templates. A procmon trace should help you find what file the process is missing.

Resources