Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
fopen() with vista

 
Post new topic   Reply to topic Printable version
 View previous topic  infantry server Post :: Post Something about the Wiki  View next topic  
Author Message
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Fri Nov 07, 2008 11:05 am   Post maybe stupid    Post subject: fopen() with vista Reply to topic Reply with quote

I write any files in vista using fopen() is there something you need to different for vista?



this is how i used fopen...(worked with xp)
Code: Show/Hide

    bool run=true;
    FILE* f;
   
    while(run)
    {
              if(!(f=fopen("file.txt","w")))
              {
                                                MessageBox(0,"Can't write to file.txt","file.txt",0);
                                                return 0;
              }
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri Nov 07, 2008 11:08 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

should work with Vista as well.

I think fopen would even work on Linux. It's a pretty standard IO operation
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Adam01
Novice


Joined: Oct 03 2008
Posts: 51
Offline

PostPosted: Fri Nov 07, 2008 12:23 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Does the file.txt exist? I think you need to use W+.
What library is MessageBox() in?
Isnt this c#?
Back to top
View users profile Send private message Add User to Ignore List
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Fri Nov 07, 2008 1:41 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

i got it to work, vista was blocking it i guess, anyway to adam01 its c++ and MessageBox() is in windows.h
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri Nov 07, 2008 1:55 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Vista has that DEP thing or something that prevents programs from writing in places such as Program Files
Back to top
View users profile Send private message Add User to Ignore List
JoWie
Server Help Squatter


Gender:Gender:Male
Joined: Feb 25 2004
Posts: 215
Offline

PostPosted: Fri Nov 07, 2008 5:22 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Doesn't vista redirect it to a different folder
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 17 page(s) served in previous 5 minutes.

phpBB Created this page in 0.578423 seconds : 30 queries executed (90.1%): GZIP compression disabled