Netware 3.1 , Windows 3.1 and VB 
Author Message
 Netware 3.1 , Windows 3.1 and VB

Does anyone know how to write some VB code that will make a windows 3.1 PC
attach to a server and map a network drive in Novel Netware 3.1 so that a
program on that server is run automatically?  We wish to have an program
icon in the program manager which, when it is double-clicked, causes a
network conection, drive-mapping and program execution without any manual
intervention.

Can it be done?

Keith



Sat, 19 Feb 2000 03:00:00 GMT  
 Netware 3.1 , Windows 3.1 and VB

Quote:

> Does anyone know how to write some VB code that will make a windows 3.1 PC
> attach to a server and map a network drive in Novel Netware 3.1 so that a
> program on that server is run automatically?  We wish to have an program
> icon in the program manager which, when it is double-clicked, causes a
> network conection, drive-mapping and program execution without any manual
> intervention.

> Can it be done?

> Keith


A basic idea (not very smart !) : do it with the File Manager and
SendKeys ?

--
-------------------------------------------------------------------
Philippe ROSE                       Tl.  33 (0)4 92 72 18 66
EBIM S.A.                           Fax   33 (0)4 92 87 31 86

04100 MANOSQUE                             ^
FRANCE                                     This is a 'L' !
-------------------------------------------------------------------



Sat, 19 Feb 2000 03:00:00 GMT  
 Netware 3.1 , Windows 3.1 and VB


Quote:


>> Does anyone know how to write some VB code that will make a windows 3.1 PC
>> attach to a server and map a network drive in Novel Netware 3.1 so that a
>> program on that server is run automatically?  We wish to have an program
>> icon in the program manager which, when it is double-clicked, causes a
>> network conection, drive-mapping and program execution without any manual
>> intervention.

>> Can it be done?

>> Keith

>A basic idea (not very smart !) : do it with the File Manager and
>SendKeys ?

I'm not sure if I understand you perfectly. I think you might investigate
the windows API calls that manage network connections. However, on the only
network I've really worked on, you need admin privileges to get a reliable
connection. And as for the execution of a program on the server, do you
mean you want to execute a program on the server (i.e. on the physical
server) or do you mean that you want to execute a program stored on the
server on your workstation. I'm afraid I can't offer much help though, the
only work I've done with any network of similar specification has been in a
totally different area of work(and the server used OS/2, if you please!)

                           Shiva
--
"Information is Knowledge, Knowledge is Power, Power is Dangerous"
"Information Overload... I've a thousand pages on it..."
"Play with fire - burn your fingers"



Sat, 19 Feb 2000 03:00:00 GMT  
 Netware 3.1 , Windows 3.1 and VB

Quote:

>Does anyone know how to write some VB code that will make a windows 3.1 PC
>attach to a server and map a network drive in Novel Netware 3.1 so that a
>program on that server is run automatically?

You can use WNetAddConnection to map a network drive to a Windows letter
drive (like "H:"). You can use WNetGetConnection to see how a drive is
mapped, and (for completeness, there are only different 3 calls),
WNetCancelConnection to remove the mapping.

You can then just use Shell to run the program from the network drive.

So, IMO, just an icon that does this isn't possible. You need a little
local program that does this.

WIN31API.TXT doesn't contain the declarations. Here they are from the
file accompaning Appleman's book:

Declare Function WNetAddConnection% Lib "User" (ByVal lpszNetPath$,
ByVal lpszPassword$, ByVal lpszLocalName$)
Declare Function WNetCancelConnection% Lib "User" (ByVal lpszName$,
ByVal fForce%)
Declare Function WNetGetConnection% Lib "User" (ByVal lpszLocalName$,
ByVal lpszRemoteName$, cbRemoteName%)

I think you better start experimenting with WNetGetConnection.
lpszLocalname$ is the drive letter (plus colon, if you like),
lpszRemoteName$ is the receiving buffer, cbRemoteName% is the size of
this buffer.

In WNetAddConnection, feed this value into lpszNetPath$. lpszLocalName$
is the new drive letter, lpszPassword$ is the required password to
login, empty string if none required.

HTH,
Bart.



Sun, 20 Feb 2000 03:00:00 GMT  
 Netware 3.1 , Windows 3.1 and VB

Keith,

You may go to Novell WebSite and have a look at the Netware SDK (which
is a beta version for VB), may be it can help.

Alan

Quote:

>Does anyone know how to write some VB code that will make a windows 3.1 PC
>attach to a server and map a network drive in Novel Netware 3.1 so that a
>program on that server is run automatically?  We wish to have an program
>icon in the program manager which, when it is double-clicked, causes a
>network conection, drive-mapping and program execution without any manual
>intervention.
>Can it be done?
>Keith




Sun, 20 Feb 2000 03:00:00 GMT  
 Netware 3.1 , Windows 3.1 and VB


Quote:

>Does anyone know how to write some VB code that will make a windows 3.1 PC
>attach to a server and map a network drive in Novel Netware 3.1 so that a
>program on that server is run automatically?  We wish to have an program
>icon in the program manager which, when it is double-clicked, causes a
>network conection, drive-mapping and program execution without any manual
>intervention.

>Can it be done?

Yes, it can be done. Search for NIVB.ZIP; it contains some (old) sample code
created by a Novell employee that shows the DLL function declarations for
NWNETAPI.DLL. Better yet, search for NW41BAS.* (EXE or ZIP, I'm not sure). It
contains newer code by Joseph DiVito with function declarations for
NWCALLS.DLL. This allows you to code for NetWare 3.x and NetWare 4.x. Samples
include a SLIST viewer and a USERLIST viewer.

Of course, you need to know which function to use to do a given task. For
background and understanding, look at Novell's web site. All their
documentation (all NetWare SDK manuals!) are online. Very helpful stuff.

HTH,



Tue, 22 Feb 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Using WINAPI 3.1 call FindExecutable on Windows 3.1

2. Problem: Win 3.1 crashes with PB 3.1 programs

3. VB For Macintosh & Windows 3.1

4. Compile VB 6 as Windows 3.1 app?

5. VB 5.0 Apps in Windows 3.1

6. VB For Macintosh & Windows 3.1

7. VB 5.0 & windows 3.1

8. VB 4 16 bit in windows 3.1

9. Setup VB 4 on Windows 3.1 machine

10. Remote Automation : Windows 3.1 client/ Windows NT Server

11. .Wav sound access under Windows 3.1 for VB 4.0

12. VB 4.0, Windows 3.1 and dead Acces 2.0

 

 
Powered by phpBB® Forum Software