English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

For a school project i wrote this chat program in Qbasic called chat. This is how it works, on a network sombody opens the program, what happens the program then looks for a file on share called log, share is availble to every one on different computers. Once its found log then the program moniters any changes and if so does what the program does. I want to make so people can over the internet can request for this log file and also make so that they can send there log file to my computer. PLEASE HELP!

2007-08-03 18:05:54 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

While I never used a network when I programmed with Qbasic
I believe that you would need to use the extended OPEN statement:

OPEN Path FOR Mode ACCESS AccessMode LockMode AS #FileNumber LEN = RecordLenght

AccessMode Parameters in OPEN instruction:

READ = Opens the file for reading only.
WRITE = Opens the file for write only.
READ WRITE = Opens the file for reading and writing (legal only if Mode is APPEND,RANDOM, or BINARY

LockMode Parameters in OPEN instruction:

(default) Only one user can open the file at a time.
SHARED Multiple users can open the file jointly
LOCK READ No other user can read from the file
LOCK WRITE No other user can write to the file
LOCK READ WRITE No other user can access the file

Try the following statement using your file location for C:LOG and your file number.

OPEN "C:LOG" FOR APPEND ACCESS READ WRITE SHARED AS #FileNumber

2007-08-04 14:24:43 · answer #1 · answered by DynaSoar 4 · 0 0

Hmm its been ages since I've used QBasic, but I don't seem to remember it having much (any?) support for networking protocols like TCP/IP (one of the driving factors that moved me to C/C++) You might consider migrating as well.

2007-08-04 01:15:03 · answer #2 · answered by mdigitale 7 · 0 0

There will be too many issues with security. You may want to go to www.planetsourcecode.com and try something else. Also I recommend you try C language if you know how to program in 'C'.

2007-08-04 01:12:46 · answer #3 · answered by axebonez 2 · 0 0

fedest.com, questions and answers