PDA

View Full Version : LAN module: How to ... dissipate a vaporware around ThinBASIC



RobertoBianchi
14-09-2007, 15:06
To best support our "professional user", we started the ThinBASIC_LAN module.
The attempt of the new module is give a frendly approach to first discovery the network and then manage it.

It's build from the scratch so for now we have only the following function:

LAN_GetUserInformation()
LAN_GetMachineInformation()
LAN_GetGroupInformation()
LAN_GetDCName()
LAN_GetUseInformation()
UPDATED 16/09/2007
LAN_GetUniversalName()
LAN_GetConnectionName()
LAN_GetRemainingName()
UPDATED 17/09/2007
LAN_GetUser()
UPDATED 18/09/2007
LAN_ConnectDialog()
LAN_DisconnectDialog()
UPDATED 20/09/2007
LAN_GetLastExtendedError()
LAN_AddConnection()
LAN_CancelConnection()


Both the five functions required at least Windows NT Workstation and off course a network available.
If you wish to use the function LAN_GetUseInformation() in order to gathering USE information from a remote computer, then the remote computer must support remote RPC calls using the legacy Remote Access Protocol mechanism.
Note that the LAN_GetUseInformation() function lists all current connections between the local computer and resources on remote servers (must be at least one active) .

Any comments and/or suggestions will be very appreciated.

Regards,
Roberto

Petr Schreiber
14-09-2007, 16:52
Hi Roberto,

this seems like a good set.
I have not real LAN at home, just few PCs connected to internet via router ( but PCs cannot see each other ).
Even in such a situation your module is able to give some interesting information, which is nice ( mostly the LAN_QueryInformation.tbasic, others return empty info ).


Thanks,
Petr

RobertoBianchi
14-09-2007, 18:03
Well, I'll add some new functions ASAP (may be available also with Windows 98 PC).

Ciao,
Roberto

Michael Hartlef
14-09-2007, 18:14
Hi Roberto,

I have two PC's connected with a wireless lan and I can see the other PC's folder showing in the LAN_UseEnum script

kryton9
14-09-2007, 22:32
I don't have my network setup Roberto, but will report back when it is up.

As something totally not relating to anything here, but something I think of when I see Roberto...
There was a really funny movie with Adam Sandler, The Waterboy. He is from a poor cajun family in the deep south.
His Dad leaves his Mom and goes to New Orleans to make money for the family. He first writes home and signs the letter Bob.
Then a few letters later he uses, Robert and then finally he writes to say he won't be coming home and wishes them a good life and signs it Roberto.
You can tell he fit into New Orleans and went upscale from his roots and it was very funny. I hope the humor of this scene comes across in writing :)
I thought it was a clever way of showing how people can change when they move somewhere else, some good writing to come up with that.

RobertoBianchi
16-09-2007, 09:38
I know, a football team water boy, really a funny movie.

Added to the ThinBASIC lan module the following functions:


LAN_GetUniversalName()
LAN_GetConnectionName()
LAN_GetRemainingName()


Primary scope of these functions is retrive the full UNC name of file on local or remote share, retrive only the share or the remaining name on the share.
Please note that both functions are available on Windows 98 so in the upgraded zip file you'll find also the thinBasic_LAN9x.dll.
If you wish to work in Windows 98 rename it to thinBasic_LAN.dll before putting into the \thinBasic\Lib folder.

Ciao,
Roberto

RobertoBianchi
17-09-2007, 18:02
Added LAN_GetUser() function that retrieves the current default user name, or the user name used to establish a network connection.
The function is available from Windows 98, the above ThinBasic_LAN.zip file is updated.

Ciao,
Roberto

Petr Schreiber
17-09-2007, 18:15
Hi Roberto,

thanks for your continuous work on LAN module!


Bye,
Petr

Michael Hartlef
18-09-2007, 06:57
Hi Roberto, latest enhancements doesn't show anything here.

ErosOlmi
18-09-2007, 07:18
LAN_GetUser will return the user name used to mount a LAN resource.

Imagine you have shared a resource on \\Server, so something like \\Server\ShareName
Imagine a client has mounted and mapped \\Server\ShareName as drive S:
LAN_GetUser("S:") will return the user associated with that mounted resource.

If you do not have any mounted S: drive, than LAN_GetUser will not show you anything.

Ciao
Eros

RobertoBianchi
18-09-2007, 08:48
Hi Michael,

in order to fully appreciate the LAN module you should use it in PC powered by Windows XP Professional or (at least Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, or Windows 95), that's why I say:
professional user ;D

Unfortunatly Windows XP Home Edition isn't designed to work with Windows Server networks and also not includes capabilities for both small office networks with up to 10 PCs and Windows Server based networks

In any case, here are the last minute addedd two function:


LAN_ConnectDialog() Open browsing dialog box for connecting to network resources
LAN_DisconnectDialog() Open browsing dialog box for disconnecting from network resources


Thanks,
Roberto

Michael Hartlef
18-09-2007, 09:06
Ok, sorry. Can't be a helping hand then.

kryton9
19-09-2007, 00:20
I'm glad you guys clarified the professional vrs home versions as I fall into the same boat as Mike once I get my network back up.

Petr Schreiber
19-09-2007, 12:57
Hi,

would it be possible to put some mention in help file in case command has some extra requirements ( hardware/software bindings) ?
I know it is extra work on hard job which documentation already is, but I am sure it will make users feel safe when coding.


Bye,
Petr

ErosOlmi
19-09-2007, 13:00
This module will be documented reporting Win9x/WinNT differences.
Thanks
Eros

Michael Hartlef
19-09-2007, 15:50
I'm glad you guys clarified the professional vrs home versions as I fall into the same boat as Mike once I get my network back up.

By the way has anyone found good low cost maybe oem versions of windows xp professional, I was thinking of getting a few if reasonable price to cover my needs for the coming computers I hope to build.


Don't go with an OEM version. I'm sure, just liek here, the full version aren't much more expensive. OEM version can only be installed on one machine. Once you replace a bigger part like the motherboard, then you are licking someones rearend to get them to reactivate your license.
Been there went thnrough one time and now I have to buy a new version for my sons computer. Difference here XP home, OEM 80 EURO, full 120 EURO.

Michael Clease
19-09-2007, 16:34
I was looking at prices in the UK and almost fell off my chair when I saw how versions of vista are on sale :o

http://www.aria.co.uk/Products/Software/Operating+Systems/

So many versions and I am still not interested. ;D

RobertoBianchi
19-09-2007, 17:40
I agree, too many versions confuse only the ideas!
But what it leaves me astonished are the following prices:

Windows Vista Business 32bit OEM £71.50
Microsoft Windows XP Professional OEM £73.00

This is an excellent marketing example how to discourage the purchase of a product in favor of another.

Ciao,
Roberto

Randall
19-09-2007, 18:26
Thanks for the tip, Mike.

I'm still running Windows 2000 Professional at home, and while I have XP at work, I don't really see much that is different. I was thinking of upgrading my home computer to XP, mainly because I've run across some programs that only run on XP.

I've been shying away from Vista because I've heard it is a real pig for resources. I like thin and light! I imagine I will be reluctantly forced into Vista at some point.

Of course, this is the same feeling that was prevalent years ago when Windows first came out. Prior to Windows, all PC programs ran in DOS. At the time, the Intel 286 processor was common and the 386 processor was just coming out. The 386 processor was a highly desired upgrade for improved performance. I was on a team developing a new application and a debate ensued whether to develop for DOS or Windows. I recall one programmer emphatically stating that Windows was the best way he knew to turn his new 386 into a 286, meaning Windows was such a pig (compared to DOS) that it would suck the life out of his shiny new processor chip. By the way, he was over-ruled by the boss, and we developed the application for Windows using Visual Basic version 1.0.

So, I hear these stories about Vista being a resource pig, and I think it is going to suck the life out of my computer. I haven't seen anything in Vista that compels me to go out and buy it. But no worries, Microsoft will probably have to develop and sell some new OS versions, just to keep the revenues up. Perhaps they will develop some niche version targeted to people like me who want something stripped-down and fast.

Randall

sandyrepope
19-09-2007, 23:24
Speaking about DOS and windows..... Does anyone remember the debate about which would be better.... a graphical OS or a text based OS? I remember that someone tried to make a text based OS for a while (read very short while) but it didn't make it very long at all. I just can't remember who wrote it or why it failed.

Thanks
Sandy

kryton9
20-09-2007, 02:07
Thanks Mike, I didn't know about that, I always thought OEM was just like the full retail but without any books or maybe support. So thanks for the warning!

It is funny in my last 2 computes I bought, I never got windows OS cd's, but had to burn restore dvd's for my computers. The problem with that is each time I want to do a clean install, it installs all these apps I don't want and I have to spend an hour to remove everything and then start to install what I want, hate that!!

I have also read now on more than one blog, that if you buy a notebook that comes with Vista, you will have the most difficult time installing previous versions of windows as you can't find drivers for the hardware. They had a great sale this week, a notebook for $350, nothing powerful, but more than enough to take around to surf or program on... anyways it comes with vista home, so I started to read about notebooks, vista and putting XP back on and came across these issues, so held off on the purchase.
That is scary that you are locked into one OS when you buy new complete systems now!

Petr Schreiber
20-09-2007, 08:19
Kryton,

regarding XPs - in my country there is action called "Legalise your Windows", which means you can buy relatively cheap XPs OEM without any hardware or PC bundled with.

Full XP Pro: $530
Legalise program : $191

And you must not be pirate to take advantage of this program :D.


Bye,
Petr

Michael Clease
20-09-2007, 08:58
This is for anyone that hasnt seen it before. How about XP on a USB DataPen.

http://www.tomshardware.com/2005/09/09/windows_in_your_pocket/

Michael Hartlef
20-09-2007, 11:19
Kent, OEM versions are valid only for the computer you bought it with. In the beginning the dealers were only allowed to ship them with a computer. On a seperate CD, a recovery CD or like with your computer on a harddrive partion, which then you can burn on to a CD. The harddrive version and the recovery CD are locked to your PC. Nomally you can't use them on a different computer. A few years ago the dealers here start selling OEM versions alone. But still when you install and activate them, they are locked with the computer you did the install first. I changed the motherboard one time and had a very hard time on the phone to convince the nice lady to reactivate my license. Because it was an OEM one.

The thing with Notebooks is, that they run great out of the box. Starting with graphiccard drivers, you won't find the manufacturer releasing new versions of the driver much. Maybe one or two and that's it. Like with NVidia mobile chips you need a modified version to get the NVIDIA drivers installed. And mostlikely the newest driver versions don't run anymore, that is why I'm stucked at my driver version.
But I knew that before I got my notebook.

ErosOlmi
20-09-2007, 12:03
Kent, OEM versions are valid only for the computer you bought it with. In the beginning the dealers were only allowed to ship them with a computer. On a seperate CD, a recovery CD or like with your computer on a harddrive partion, which then you can burn on to a CD. The harddrive version and the recovery CD are locked to your PC. Nomally you can't use them on a different computer. A few years ago the dealers here start selling OEM versions alone. But still when you install and activate them, they are locked with the computer you did the install first. I changed the motherboard one time and had a very hard time on the phone to convince the nice lady to reactivate my license. Because it was an OEM one.

The thing with Notebooks is, that they run great out of the box. Starting with graphiccard drivers, you won't find the manufacturer releasing new versions of the driver much. Maybe one or two and that's it. Like with NVidia mobile chips you need a modified version to get the NVIDIA drivers installed. And mostlikely the newest driver versions don't run anymore, that is why I'm stucked at my driver version.
But I knew that before I got my notebook.

I can confirm all.
Same here with ATI driver and Acer TravelMate 8204WLMi. I can only install ATI driver if released by Acer support system. Official ATI drivers just do not install or in some cases crash the OS.

RobertoBianchi
20-09-2007, 17:57
Added other three functions:

LAN_GetLastExtendedError() Retur the description of given error number
LAN_AddConnection() Add a connection
LAN_CancelConnection() Cancel a connection

Ciao,
Roberto