Open/Read/Write using CFile in a COM Object.
Posted on 2005-03-06
I have a COM Object that uses a CFile object to open a text file, read it, and write to it. In my development environment it works great. However, the released version of the COM Object will not create or edit the TXT file on the client's PC. I've also tried deploying the Debug version of the COM Object just to ensure that would have no impact on the problem, which it didn't. I can't post MessageBoxes due to the nature of the COM Object and so I can't see what code is returned via CFileException. I'm thinking it's a rights issue. I'm hoping that I won't have to setup a full debug environment on the client PC just to determine what's up with this issue. The target PC is running Windows Server 2003 but I have also seen the same problem on a Win XP Pro PC. I can post source code if need be but, since it is working great locally, I don't think the source code is the issue. Is there something I should do on the target PC to allow my application to perform file I/O? Any ideas are appreciated.