The error I get is on with line 156 in the example code. “batchUnlocker.AddSelection((EdmVault5)vault1, ref ppoSelection);”
Any one else having this problem and are there any known workarounds?
Cross posted on the swamp.
Just a shot in the dark, but did you double check that the properties “Prefer 32-bit” in your visual studio project is unchecked? This can cause the API to freak out unexpectedly.
I did have this checked, but when I unchecked it, I got a problem with the openfiledialog. I commented that stuff out and just hard coded a file id and folder id to my pposelection single element array.
Same issue.
Attached is the example code with filedialog related code commented out and file id and folder id hard coded just to focus on the one issue. You would have to replace the hard coded values with ids that match folders and documents in your vault to run this. I had working code prior to upgrading to 2022 sp4, so I suspect something is broken or has changed on the upgrade, so the version of the api you are running I believe is important.
I think I figured it out. when I upgraded to 2022 and reselected epdm.interop.epdm I forgot to flip “embed interop types” from true to false again. Flipped it back and it works!
I think that gets us all from time to time which is why this and the 32-bit selection are the first things typically suggested to check before digging further into the code. Glad you got it sorted!