Autor Beitrag
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Di 18.10.05 21:35 
Also ich hab zuhause nen LAN und arbeite viel mit freigegebenen Ordnern. Aber alle Freigaben zu löschen manuell ist viel zu aufwändig. Gibt es keine Delphi-fnktion mit der man mit einem Knopfdruck alle Freigegenen Ordner löschen kann. Also nicht löschen im sinne von von der festplatte fegen sondern dass sie nicht mehr freigegeben sind. WÄre scön wenn ihr mir helfen könntet!!!!

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 18.10.05 21:48 
Delphi nicht, aber Windows kennt da was: Suche im MSDN WNETCANCELCONNECTION2.
digi_c
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1905

W98, XP
D7 PE, Lazarus, WinAVR
BeitragVerfasst: Mi 19.10.05 07:57 
Also bei Win98 waren die auch einfach in der Registry eingetragen, such mal in der Registry nach "lanman" vielleicht ist das für dich einfacher umzusetzen.
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mi 19.10.05 10:17 
Titel: wt
@ Luckie:

Das Problem ist, dass im Microsft Developer Network die Funktionen nur für C++ enthalten sind. Ich habe allgemein Probleme damit, diese in Delphi einzubauen. Was kann ich da genau tun?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
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: Mi 19.10.05 19:41 
Das JEDI Projekt haben für (fast) alle WinAPI-Funktionen die fertig übersetzten Header. Such einfach mal danach ;-) Glaube JwaHeaderdatei.pas oder JwHeaderdatei.pas ...

_________________
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.
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mi 19.10.05 20:00 
Titel: asd
www.google.de/search...mp;meta=lr%3Dlang_de

Nix gefunden im Forum auch nich. :gruebel: Bessere idee???

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Mi 19.10.05 20:19 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
DWORD WNetCancelConnection2(
  LPCTSTR lpName,
  DWORD dwFlags,
  BOOL fForce
);


wo ist das Problem?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
const
  P:Pchar='\\unc';
  ...  
  WNetCancelConnection2(P,0,true) ;

grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Do 20.10.05 08:42 
Titel: qwertz
Ich hab das mal ausprobiert, aber das funzt nich. Wäre schön, wenn ihr das mal berichtigen könntet. Compiliert wird es zwar, aber am ordner tut sich nix!!!! :bawling:

Ausserdem weiß ich auch nicht, wo ich das hinschreiben soll:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
DWORD WNetCancelConnection2(  
  LPCTSTR lpName,  
  DWORD dwFlags,  
  BOOL fForce  
);


CU KOLLER

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 20.10.05 09:55 
WNetCancelConnection? :gruebel: Heißt das nicht, dass man eine Verbindung zu einer Freigabe abbrechen/beenden will? Wenn man auf seinem eigenen Rechner Ordner freigeben will, dann sollte das doch eher Suche im MSDN "NETSHAREADD" sein. Oder das Gegenstück: Suche im MSDN "NETSHAREDEL". Oder irre ich da?
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 20.10.05 10:42 
Ups, könntest recht haben.

@Koller: Die meisten API Funktionen sind schon in der Windows.pas deklariert.
koller1
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 216

WIN XP
D7 Ent
BeitragVerfasst: Do 20.10.05 20:30 
Aber wenn ich mich nicht irre, ist auf der msdn-site alles in C++ geschrieben und damit kann ich leider noch nichts anfangen. Kann man das überhaupt auf Delphi umschreiben oder muss man es bleiben lassen? Ich meine, ich kann doch einen Ordner mit der obrigen Funktion aus dem Helper freigeben. Warum kann ich ihn dann nicht wieder in den normalen Zustand versetzen mit Delphi?

_________________
PLEASE INSERT SYSTEM DISK AND PRESS ENTER!
Und wenn du nicht gestorben bist, presst du noch heute! ;)
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Fr 21.10.05 16:54 
user profile iconkoller1 hat folgendes geschrieben:
Aber wenn ich mich nicht irre, ist auf der msdn-site alles in C++ geschrieben und damit kann ich leider noch nichts anfangen. Kann man das überhaupt auf Delphi umschreiben oder muss man es bleiben lassen? Ich meine, ich kann doch einen Ordner mit der obrigen Funktion aus dem Helper freigeben. Warum kann ich ihn dann nicht wieder in den normalen Zustand versetzen mit Delphi?


tja, leider ist alles in C.
Aber dass sollte doch kein Problem sein, dieses in entsprechende Pascal-Syntax umzusetzen.
In der Regel lässt sich alles doch einfach ableiten.
ansonsten Google.

grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Fr 21.10.05 20:44 
Waru keine Schwierigkeit die umzusetzen? Ich habe null ahnung von C. Deshalb weiß ich nichts mit den FUnktionen aus MSDN anzufangen

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot