1 Reply Latest reply on Apr 14, 2010 1:24 PM by Jeff Sweeney

    Return Code Mix-up

    Jim Sculley

      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:


      Error Code
      E_EDM_FILE_SHARE_ERROR         0x8004020B



      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.


      Jim S.

        • Re: Return Code Mix-up
          Jeff Sweeney

          LOL I just ran into this today!


          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!


          Thanks Jim!