Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 24th, 2005, 3:50 PM   #1
Stevo
Newbie
 
Join Date: Mar 2005
Posts: 1
Rep Power: 0 Stevo is on a distinguished road
Can't open .REG files with fopen.

Hello, I'm currently attempting to create a program that can edit registry keys. I've managed to get C++ to export the registry to the file "registry.REG"
, but I can't get fopen to open the file. I'm new to C programming, so any thoughts would be appreciated. Thanks.
Stevo is offline   Reply With Quote
Old Mar 24th, 2005, 4:04 PM   #2
Benoit
Expert Programmer
 
Benoit's Avatar
 
Join Date: Sep 2004
Location: Ontario, Canada
Posts: 550
Rep Power: 4 Benoit is on a distinguished road
What happens when you try to open them? Post your code
__________________
Johnny was a chemist's son but Johnny is no more, for what Johnny thought was H2O was H2SO4
Benoit is offline   Reply With Quote
Old Mar 24th, 2005, 4:56 PM   #3
jorgen_i
Newbie
 
Join Date: Mar 2005
Posts: 11
Rep Power: 0 jorgen_i is on a distinguished road
Make sure the name's right. Make sure the files' in the same directory as the executable OR that the filename is preceeded by the appropriate path. If fopen fails, check it's error status, maybe with perror() to see why it failed. In some cases you have to change a file's attributes to make sure it's readable. In some cases the file may be in use by another process. Checking error staus will point these things out.
jorgen_i is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:42 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC