Autor Beitrag
hibbert
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Sa 23.08.03 18:35 
Hi,
wie kann ich per Delphi einen bestimmten Ordner auf meinem PC für's Netzwerk freigeben? Andere Benutzer dürfen dann auch Daten im Ordner verändern, löschen,...

Das was man sonst Manuell so macht :wink:

thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
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: Sa 23.08.03 18:40 
Schau dir mal die Lanmanager Hilfe (Win-SDK) an, da steht alles. Stichwort:NetShareAdd()

grez
msch
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Sa 23.08.03 18:45 
MSCH hat folgendes geschrieben:
Schau dir mal die Lanmanager Hilfe (Win-SDK) an, da steht alles. Stichwort:NetShareAdd()

grez
msch

Bitte was für eine Hilfe? Sorry, ich arbeite jetzt schon etwas länger mit Delphi aber mit dieser Hilfedatei (wenn es eine ist) habe ich (wahrscheinlich) nie gearbeitet :oops: . Welche ist das und wo finde ich diese?

thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
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: Sa 23.08.03 18:50 
Sorry, sofern du D6 hast sollest du im Hilfe menü als auch auf der Platte im Hilfe-Ordner von Delphi die Win32 Delevelopers Refrences finden. Dort steht das gesuchte:
Zitat:

The NetShareAdd function shares a server resource.

Security Requirements

Only members of the Administrators or Account Operators local group or those with Communication, Print, or Server operator group membership can successfully execute NetShareAdd. The Print operator can add only Printer queues. The Communication operator can add only communication-device queues.

NET_API_STATUS NetShareAdd(

LPTSTR servername,
DWORD level,
LPBYTE buf,
LPDWORD parm_err
);


Parameters

servername

Pointer to a Unicode string containing the name of the remote server on which the function is to execute. A NULL pointer or string specifies the local computer.

level

Specifies one of the following values to set the level of information provided.

Value Meaning
2 The buf parameter points to an array of SHARE_INFO_2 structures.
502 The buf parameter points to an array of SHARE_INFO_502 structures.


buf

Pointer to the buffer in which the data set with the level parameter is stored.

parm_err

Optional pointer to a DWORD that contains the index of the first parameter that causes ERROR_INVALID_PARAMETER. If NULL, the parameter is not returned on error.


grez
msch
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Sa 23.08.03 18:51 
ich sage nur PSDK bzw. MSDN-Library (msdn.microsoft.com/library/default.asp) :wink: :)

_________________
Viele Grüße
Jakob
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Sa 23.08.03 18:56 
aha, danke,
mhh, aber da blicke ich nicht durch. Ich finde diese Datei nicht (die Hilfedatei) und dann auch noch alles in Englisch :roll:

Naja, wird ein bisschen dauern bis ich das hinbekomme :wink:

thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
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: Sa 23.08.03 19:02 
:D , na dann mach mal nen vorschlag an BillyBoy, er soll dat alles mal eindeutschen.

Sorry, aber englisch sollteste schön können.

grez
msch

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

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Sa 23.08.03 19:59 
MSCH hat folgendes geschrieben:
[...]Sorry, aber englisch sollteste schön können.

grez
msch

Na english kann ich auch (jedenfalls verstehe ich es) doch teilweise bin ich da durch Irritiert, dass ich einige, wie ich meine, wichtige begriffe nicht kenne. Das verwirrt mich meistens. Und dann habe ich keine lust mehr, nach der Übersetzung zu suchen :wink:

thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
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: Sa 23.08.03 20:05 
welche zum Beispiel?
grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?