Autor Beitrag
rob87
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 461

Win Me, Win XP Home, Win XP Prof
Delphi 2007 Enterprise
BeitragVerfasst: Fr 31.08.07 13:16 
Wie kann ich einen einfachen NET USE ... in Delphi einbinden??
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 31.08.07 13:24 
ShellExecute()

_________________
Markus Kinzler.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 31.08.07 13:56 
Moin!

Alternativ WinAPI: Suche in: Delphi-Forum, Delphi-Library WNETADDCONNECTION

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 31.08.07 17:54 
Man beachte bitte auch die Varianten mit zustzlichen Zahlen am Ende ...

Getreu dem Motto: Warum ein TMemo auf die Form packen, wenn ich auch Notepad zur Texteingabe starten kann.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
rob87 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 461

Win Me, Win XP Home, Win XP Prof
Delphi 2007 Enterprise
BeitragVerfasst: Mo 03.09.07 08:12 
www.delphi-forum.de/...ht=wnetaddconnection

Ich hab da mal nachgeschaut und bin auf folgenden Quelltext gestoßen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
var  
  ner : TNetResource;  
  res : dword;  
begin  
  ner.dwType       := RESOURCETYPE_DISK;  
  ner.lpLocalName  := 'Z:';  
  ner.lpRemoteName := '\\Rechner\Freigabename';  
  ner.lpProvider   := nil;  

 
  res              := WNetAddConnection2(ner,  
    'SuperGeheimesPwd',  
    'OttoNormalUser',  
    0);  

 
  if(res = NO_ERROR) then ShowMessage('Super, klappt ja!')  
    else ShowMessage(Format('Fehler %d',[res]));  
end;


Allerdings wüsst ich noch gern, wie ich des umformulieren muss, um dass Passwort und einen Benutzernamen selbst eingeben zu müssen. Aber auch ein Benutzerlogin funktioniert nicht.
rob87 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 461

Win Me, Win XP Home, Win XP Prof
Delphi 2007 Enterprise
BeitragVerfasst: Mo 03.09.07 08:39 
Bin fündig geworden:

www.dsdt.info/tipps/...&search=laufwerk


Alles wunderbar beschrieben und es funktioniert.
Danke
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: Mo 03.09.07 11:09 
[ot]
user profile iconBenBE hat folgendes geschrieben:

Getreu dem Motto: Warum ein TMemo auf die Form packen, wenn ich auch Notepad zur Texteingabe starten kann.

Mann, warum musstest du auch deine Signatur ändern... *heul*
[/ot]

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell