1. Calling conventions for Win32 dll -- Sharing files

Euphorians:
In the quest of improving the Thermometer device, I've been trying to
icrease the usefulness of the engine, by allowing to record the temperature
readingns into a file. Another PC on the security desk, some floors down,
could then monitor the temperature of the computer room.
That looks simple. But when I try to read that file from the other PC (the
file is being stored on a NT server) I get an error telling the file is
already open by another program....
Let's increase the complexity. I thought for a while to write a "simple"
winsock program to send the data over the network. But when reading the
Winsock API headers for the dll calls, I see "FAR PASCAL" in front of the c
procedure definitions. I recall something about "reverse order" or similar
when calling Pascal procedures from C.
Does anybody know:
a) How to share files in Euphoria along the network?
b) How to call Pascal procedures inside a .DLL?

Any help will be *very* welcome...

JesusC-frustrated-by-technology.

new topic     » topic index » view message » categorize

2. Re: Calling conventions for Win32 dll -- Sharing files

Hi,

Sounds like you open the file on one computer and keep it opened while =
another program tries to read it. That's not supported in windows and =
dos.=20

Solution (in pseudo code):

open file
write data
close file
open file with other program
read file with other program
close file
start at begin.

only problem: reading and writing at the same time would not work.
A much better idea would be:

open temp file=20
write data to temp file
close temp file
copy temp file to other file

than parallel:

open temp file                          open other file with other program
write data to temp file                 read other file with other program
close temp file                         close other file with other program
copy temp file to other file

start at beginning.

-----Oorspronkelijk bericht-----
Van:    JesusC - Jes=FAs Consuegra=20
Verzonden:      dinsdag 23 juni 1998 18:22
Aan:    EUPHORIA at cwisserver1.mcs.muohio.edu
Onderwerp:      Calling conventions for Win32 dll -- Sharing files

Euphorians:
In the quest of improving the Thermometer device, I've been trying to
icrease the usefulness of the engine, by allowing to record the =
temperature
readingns into a file. Another PC on the security desk, some floors =
down,
could then monitor the temperature of the computer room.
That looks simple. But when I try to read that file from the other PC =
(the
file is being stored on a NT server) I get an error telling the file is
already open by another program....
Let's increase the complexity. I thought for a while to write a "simple"
winsock program to send the data over the network. But when reading the
Winsock API headers for the dll calls, I see "FAR PASCAL" in front of =
the c
procedure definitions. I recall something about "reverse order" or =
similar
when calling Pascal procedures from C.
Does anybody know:
a) How to share files in Euphoria along the network?
b) How to call Pascal procedures inside a .DLL?

Any help will be *very* welcome...

JesusC-frustrated-by-technology.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Calling conventions for Win32 dll -- Sharing files

>Hi,
>
>Sounds like you open the file on one computer and keep it opened while
another program tries to read it. That's not supported in windows and dos.

In win95 it is built-in, as I recall.
Dos needs to have "device = share.exe" in its config.sys
This will enable an interrupt dos programs can use.
The interrupt will maintain the opened file, and all programs that want to
use the file are being fooled by a virtual file handle, and all I/O
commands, etc. are maintained by the interrupts.

Some1, please correct me if I'm wrong, this is what I concluded, but
certainly do not know for sure.

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl

new topic     » goto parent     » topic index » view message » categorize

4. Re: Calling conventions for Win32 dll -- Sharing files

If you have a NT-server it's hard to share files. At least that's my =
experience. If I try to open a file which I'm editing in Word on another =
machine, it gives an error.=20

There might be some-way to do it, try looking at the sharing options in =
the property sheet.

Have fun,

Sebastiaan

-----Oorspronkelijk bericht-----
Van:    Ralf Nieuwenhuijsen=20
Verzonden:      dinsdag 23 juni 1998 21:22
Aan:    EUPHORIA at cwisserver1.mcs.muohio.edu
Onderwerp:      Re: Calling conventions for Win32 dll -- Sharing files

>Hi,
>
>Sounds like you open the file on one computer and keep it opened while
another program tries to read it. That's not supported in windows and =
dos.

In win95 it is built-in, as I recall.
Dos needs to have "device =3D share.exe" in its config.sys
This will enable an interrupt dos programs can use.
The interrupt will maintain the opened file, and all programs that want =
to
use the file are being fooled by a virtual file handle, and all I/O
commands, etc. are maintained by the interrupts.

Some1, please correct me if I'm wrong, this is what I concluded, but
certainly do not know for sure.

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl

new topic     » goto parent     » topic index » view message » categorize

5. Re: Calling conventions for Win32 dll -- Sharing files

Sebastiaan:

> Sounds like you open the file on one computer and keep it opened
> while another program tries to read it. That's not supported in
> windows and dos.

I'm not so sure WINDOWS and DOS cannot share files. (Do you remember the
"Share" command on DOS?).

> Solution (in pseudo code):
>
> open file
> write data
> close file
> open file with other program
> read file with other program
> close file
> start at begin.

Although your approach could work, is'n practical in this case. The
themometer takes a reading every 15 seconds, so there will be *lots* of
files involved. There are also problems in synchronizing both PCs (which
file should I read next?, etc.)

Thanks anyway.
Jesus.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu