Hello.
I have a test scoring on a net, the items are on the server and I need to pass some instrctions to
the terminals that are authorized to work with me, therefore I need and address and we've seen that
using the name such as \terminal1\c, or \accounting\c, we can easily do things such as:
redim MyTerminal$(50)
Myterminal$(1)="\accounting\c"
FileWithItems$=MyTerminal$(1)+":Name.dat"
open FileWithItems for output as #1
' at this point I can send the items assigned specifically
' to the terminal according to the area to be evaluated
close 1
I can switch from a terminal to other accoring to the listing of terminals
and I left windows to administer the communication between me and
the terminals as I see all of them as part of the "local" tree on the server.
On the other side, at the terminal I can see the server the same way
using the variable
MyServer$="\\digital\server\c"
FileWithAnswers$=Myserver$+":answers.dat"
open FileWithAnswers$ for append as #1
' here I send back to the server the answers from the student
close 1
I hope this explanation helps.
Regards
Agustin
------------------
Announcement
Collapse
No announcement yet.
How can I find all the net names (not IP addresses) of the server and terminals?
Collapse
X
-
Guest replied
-
Guest repliedHi Lance:
I have a test scoring on line, the items are on the server and I need to pass some instrctions to
the terminals that are authorized to work with me, therefore I need and address and we've seen that
using the name such as \terminal1\c, or \accounting\c, we can easily do things such as:
redim MyTerminal$(50)
Myterminal$(1)="\accounting\c"
FileWithItems$=MyTerminal$(1)+":Name.dat"
open FileWithItems for output as #1
' at this point I can send the items assigned specifically
' to the terminal according to the area to be evaluated
close 1
I can switch from a terminal to other accoring to the listing of terminals
and I left windows to administer the communication between me and
the terminals as I see all of them as part of the "local" tree on the server.
On the other side, at the terminal I can see the server the same way
using the variable
MyServer$="\\digital\server\c"
FileWithAnswers$=Myserver$+":answers.dat"
open FileWithAnswers$ for append as #1
' here I send back to the server the answers from the student
close 1
I hope this explanation helps.
Regards
Agustin
------------------
Leave a comment:
-
You can get the name of the "local" PC that app is running on with the GetComputerName() API.
This name forms the "base" portion of the UNC name, ie, A machine called "Accounting" will have the UNC name "\\Accounting"
Maybe your "terminals" can use this API and pass the results back to the "server"? What do you exactly want to achieve with this information?
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Leave a comment:
-
Guest repliedHello: Thank you for your comment.
In fact if you go to the windows explorer, and you see the server tree,
you may see a folder for the hard disk as c, a folder for the CDROM as d, terminals on the net will be presented with a shared folder
(a small hand is below the folder to simulate sharing) and the name declared by the user, for instance "accounting", or "terminal2". If you clic
the folder of terminal 2, you´ll see the drive c of that terminal and other directories.
On the other side, if you're on the computer whose name is "terminal2", you´ll see the server with the
folder and the hand in the shared directories, the server has a name such as "digital/server" and c is the local drive of the server.
I tried to explain what I can see in Windows explorer, but I cannot get the names "terminal2" or "digital\server".
Regards
------------------
Leave a comment:
-
A notation like "\\terminal\c" is really describing a share: \\terminal is the name of the server and \c is the shared resource on that server.
Perhaps there's a WinAPI function that can be used to list the visible shares on a server?
------------------
[email protected]
http://www.northnet.org/bdurland
Leave a comment:
-
Guest started a topic How can I find all the net names (not IP addresses) of the server and terminals?How can I find all the net names (not IP addresses) of the server and terminals?
I can get the IP of the computer where I'm running my program as server, for instance 123.123.123, and I can get the IP of the terminals, also 123.123.123,
nevertheless there is also a name of the terminals such as \\accounting\c, \\terminal1\c, \\manager\c, and the server is \\digital\server\c. Those names are shown in the tree of the server where
IP addresses are not shown, instead the name is present. For the user the IP has no meaning and the name he assigns is more suitable to be refered by my program.
How can I get all those names (for the server and the terminals)?
Best regards.
------------------
Tags: None
Leave a comment: