Network problem with freebasic and freedos

DOS specific questions.
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Network problem with freebasic and freedos

Postby Cpcdos » Apr 29, 2014 12:04

Hi
I have a big problem
I have freedos with MSClient 3.0 installed and a network drive connected (x:)
With EDIT.COM I can edit files content on x: (no problem!)
but on my dos freebasic program (.Exe) can see files on x: but i can't read content or write ! :(

I not have this problem with MSDOS 6 or 7 or DR-DOS, why?

can you help me please?
Thank's
TJF
Posts: 3567
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Network problem with freebasic and freedos

Postby TJF » Apr 29, 2014 17:14

Did you check privilegues yet?

What error message do you get from an input statement like:

Code: Select all

VAR r = GET( ... )
IF r THEN ?r
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Network problem with freebasic and freedos

Postby Cpcdos » May 01, 2014 15:34

I will test this code when i will get my pc later....

But if this code dosen't work, how i do it ? :/
TJF
Posts: 3567
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Network problem with freebasic and freedos

Postby TJF » May 01, 2014 18:59

Cpcdos wrote:But if this code dosen't work, how i do it ? :/

This depends on the error number you get ...
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Network problem with freebasic and freedos

Postby Cpcdos » May 01, 2014 19:41

He return

Code: Select all

1


the same if i delete the file

on Dr-dos or ms-dos, i not have value returned
TJF
Posts: 3567
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Network problem with freebasic and freedos

Postby TJF » May 02, 2014 7:23

1 corresponds to

    Illegal function call
(see this Wiki page.) It doesn't realy help.

I guess you've to check the fbc source code to see what happens.
dkl
Site Admin
Posts: 3211
Joined: Jul 28, 2005 14:45
Location: Germany

Re: Network problem with freebasic and freedos

Postby dkl » May 02, 2014 11:41

Sounds like the file handle passed to Get is invalid. What about the Open statement, does it succeed or fail? Usually it's much more interesting to check the error codes returned by Open, as opposed to Get or Put.
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Network problem with freebasic and freedos

Postby Cpcdos » May 02, 2014 17:02

Thank for your help,

With Open command, my dos program return

Code: Select all

2

File not found signal

the same if i delete the file...
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Network problem with freebasic and freedos

Postby Cpcdos » May 07, 2014 13:09

No solutions ?
a missing driver ? :(
dkl
Site Admin
Posts: 3211
Joined: Jul 28, 2005 14:45
Location: Germany

Re: Network problem with freebasic and freedos

Postby dkl » May 07, 2014 13:44

I know nothing about DOS, but... what code do you use to Open the file?
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Network problem with freebasic and freedos

Postby Cpcdos » May 07, 2014 13:51

Ohf .. :(

I use

Code: Select all

r = open("texte.txt" for input as #1)
close #1
IF r THEN print r
sleep


for return error code when i open a file
he return null value when there are no problems
TJF
Posts: 3567
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Network problem with freebasic and freedos

Postby TJF » May 07, 2014 13:56

Which return value do you get from the CHDIR command befor you open the file?
dkl
Site Admin
Posts: 3211
Joined: Jul 28, 2005 14:45
Location: Germany

Re: Network problem with freebasic and freedos

Postby dkl » May 07, 2014 14:05

Does it work when specifying the full path, and/or when using For Binary Access Read?

Code: Select all

var filename = curdir() + "\texte.txt"
print "opening '" + filename + "'..."

var f = freefile( )
var errnum = open(filename, for binary, access read, as #f)
print "open() = " & errnum
if errnum then
   print "failed to open file '" + filename + "'"
   end 1
end if
close #f
Cpcdos
Posts: 207
Joined: Mar 06, 2013 13:52
Location: France - LYON 69003
Contact:

Re: Network problem with freebasic and freedos

Postby Cpcdos » May 07, 2014 15:06

I have tested with VirtualBox + FreeDos, i have the same error

so i have this :
Image

I have been verity if i have previleges, and is Ok ! (on DR-DOS ou MS-DOS i not have this problem)

A solution ? :/
dkl
Site Admin
Posts: 3211
Joined: Jul 28, 2005 14:45
Location: Germany

Re: Network problem with freebasic and freedos

Postby dkl » May 07, 2014 17:18

It can be opened after it was deleted? That's really weird, as if somewhere internally the error checking logic is inverted...

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 3 guests