I'm writing an add-in and as all good programmers should do , I am making sure all the possible error conditions are handled gracefully. According to the API docs, the AddFile method of the IEdmFolder5 object can raise any of the following errors:
I have all of these covered, but while testing I had some odd results. I passed in a file name of ':' which according to Microsoft is invalid. The AddFile call raises a E_EDM_FILE_SHARE_ERROR instead of the expected E_EDM_INVALID_NAME error. I think the documentation may have some of the name to value mappings messed up. Not good.
I am working with the XML import tool and several of the files contained question marks in the file name. (The files are in a UNIX based system where this is legal...obviously these are invalid in the Windows environment.)
The XML import tool's log file is full of FILE_SHARE errors. Luckily I remembered your post, or I still would be trying to figure out why I was having share violations!