Link to home
Create AccountLog in
Avatar of Xolutionz
Xolutionz

asked on

Open/Read/Write using CFile in a COM Object.

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.
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Xolutionz
Xolutionz

ASKER

I've thought about asking the client to login as Administrator and try it again, which would verify whether it's a permissions problem or not.  I'll also investigate the other debugging tool that you've described.  Thanks for the advice.
Sorry -- I forgot to update this thread.  I figured out the problem.  I had to right-click on the specific directory and grant full permissions to Everyone.  That fixed it.