English
Source / code snippets

Api Through Netzlaufwerk separate contact

 
Netzlaufwerk contact and separate through API of Ragnar Rehbein
CompileMarkSeparation
proc netuse

    parameters unc$,lw$,user$,pwd$
    def WNetAddConnection2(4)  !"mpr.dll","WNetAddConnection2A"
    declare nr#
    struct NETRESOURCE =
    dwScope&,
    dwType&,
    dwDisplayType&,
    dwUsage&,
    lpLocalName&,
    lpRemoteName&,
    lpComment&,
    lpProvider&
    dim nr#,NETRESOURCE
    nr#.dwtype& = 1    Laufwerk
    nr#.lpLocalName& = addr(lw$)
    nr#.lpRemoteName& = addr(unc$)
    return WNetAddConnection2(nr#,addr(pwd$),addr(user$),0)

endproc

proc netcancel

    parameters lw$
    def WNetCancelConnection(2) !"mpr.dll","WNetCancelConnectionA"
    return WNetCancelConnection(addr(lw$),1)   1 - zwangsweises trennen

endproc

cls
print netuse("\\or-server\raid5","z:","Administrator","geheim")
waitinput
print netcancel("z:")
waitinput
 
07/16/04  
 



Netzlaufwerk contact Variante 2
CompileMarkSeparation
DEF ConnectNet(3) !"mpr.dll","WNetAddConnectionA"
declare mpr&
let mpr& = UseDLL("mpr.dll")
Declare unc$, pwd$, localpath$
Let unc$ = "\192.168.1.5\C$"
Let pwd$ = ""
let localpath$ = "O:"
ConnectNet(Addr(unc$),Addr(pwd$),Addr(localpath$))
FreeDLL<
r&
 
07/16/04  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.886 Views

Untitledvor 0 min.
H.Brill01/09/23
Torben Nissen02/15/19
p.specht01/03/19
AndreasS01/02/19
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie