🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.basic
Article #122

Re: $B#V#B#4!%#00J9_$G$N%M%C%H%o!<%/%I%i%$%V3d$jEv$F(J

#122
From: Dacyura
Date: Tue, 03 Jun 1997 00:00
63 lines
2600 bytes
$B%a!<%k$K$F0J2<$N$h$&$J2sEz$rF@$^$7$?!#(J
$B$G$9$,!"$=$N$^$^$G$O$b$C$?$$$J$$$N$G!"7G:\$9$k$3$H$K$7$^$7$?!#(J
$B2sEz<T$N>5Bz$OF@$F$*$j$^$9!#(J


> $B:9=P?M(J : Dacyura <r.j@bekkoame.or.jp>
> News Group : fj.lang.basic
> $B7oL>(J : $B#V#B#4!%#00J9_$G$N%M%C%H%o!<%/%I%i%$%V3d$jEv$F(J
> $BAw?.F|;~(J :  1997$BG/(J 5$B7n(J 28$BF|(J $B?eMKF|(J 23:11

>
$B!!#V#B#4!%#0$N%3!<%I$G!"%M%C%H%o!<%/%I%i%$%V$r<+F0E*3d$jEv$F$k$h$&$J%3!<%G(J
> $B%#%s%0J}K!$O$J$$$G$7$g$&$+!)(J

Option Explicit

Const RESOURCE_GLOBALNET = 2
Const RESOURCETYPE_DISK = 1
Const RESOURCEDISPLAYTYPE_GENERIC = 0
Const RESOURCEUSAGE_CONNECTABLE = 1

Private Type NETRESOURCE
     dwScope As Long        ' RESOURCE_GLOBALNET
     dwType As Long         ' RESOURCETYPE_DISK
     dwDisplayType As Long  ' RESOURCEDISPLAYTYPE_GENERIC
     dwUsage  As Long       ' RESOURCEUSAGE_CONNECTABLE
     lpLocalName As String  ' "Drive:"
     lpRemoteName As String ' "\\Server\Resource"
     lpComment As String    ' "Comment"
     lpProvider As String   ' "Provider Name" Null OK
End Type

Private Declare Function WNetAddConnection2& Lib "MPR.DLL" _
   Alias "WNetAddConnection2A" (lpNetResource As NETRESOURCE, _
                                ByVal lpPassword$, _
                                ByVal lpUsername$, _
                                ByVal fdwConnection&)

Private Declare Function WNetCancelConnection2& Lib "MPR.DLL" _
   Alias "WNetCancelConnection2A" (ByVal lpszName$, _
                                   ByVal fdwConnection&, _
                                   ByVal fForce&)

Private Sub Command1_Click()
   Dim ns As NETRESOURCE

   ns.dwScope = RESOURCE_GLOBALNET
   ns.dwType = RESOURCETYPE_DISK
   ns.dwDisplayType = RESOURCEDISPLAYTYPE_GENERIC
   ns.dwUsage = RESOURCEUSAGE_CONNECTABLE
   ns.lpLocalName = "E:"
   ns.lpRemoteName = "\\hp\/home"
   ns.lpComment = "$B%3%a%s%H(J"
   ns.lpProvider = ""

   Dim RC&
   RC& = WNetAddConnection2&(ns, "password", "username", 0&)

   ' $B$3$l$G!"(JE: $B$G!"(J\\hp\/home $B$K%"%/%;%9=PMh$^$9(J

   RC& = WNetCancelConnection2&("\\hp\/home", 0&, False)
End Sub
Technical Details
Message-ID: <01bc7028$9d86ef40$719ad2ca@r.j>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bc6b72$7b916060$0994d2ca@r.j>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: f5300,91451d46b691fc44,start
X-Google-Attributes: gidf5300,public
From: "Dacyura" <r.j@bekkoame.or.jp>
Subject: Re: $B#V#B#4!%#00J9_$G$N%M%C%H%o!<%/%I%i%$%V3d$jEv$F(J
Date: 1997/06/03
Message-ID: <01bc7028$9d86ef40$719ad2ca@r.j>
X-Deja-AN: 245824034
References: <01bc6b72$7b916060$0994d2ca@r.j>
Organization: $B2q<RL>ITL@(J
Newsgroups: fj.lang.basic