I was recently working on an app that used the SolidWorks EPDM API; specifically the app saves and restores folder permissions. While trying to set permissions, I was getting the error:
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
After trying different methods of working with the EdmFolderPermission array, I noticed that I had ‘Embed Interop Types’ set to true for the EdmLib library. After setting the property to false (as it should be for EPDM development) everything worked as expected.
Just a heads up if you’re getting unexpected errors.
Thanks a lot. Worked perfectly just intime before going mad… 🙂
Why do I always forget to uncheck this evil embed interop options? I don’t know 🙂