Entwickler-Ecke

Windows API - Alle Freigaben eines PC's ermitteln?


webmaker - Sa 12.07.03 15:48
Titel: Alle Freigaben eines PC's ermitteln?
Hi,

wie kann ich alle Freigaben eines im Netzwerk befindlichen PC's ermitteln? Das soll durch die IP oder den PC namen ermittelt werden. Wenn jemand weiß wie das geht, bitte melden ;-)

Danke schon mal!!


UC-Chewie - Sa 12.07.03 19:27

PSDK: Stichwort Suche in: Delphi-Forum, Delphi-Library WNETENUMRESOURCE


webmaker - Sa 12.07.03 19:59

Kannst du mir evtl noch ein wenig mehr helfen?


derDoc - Sa 12.07.03 21:41

Ich schreibe mal den Auszug aus dem Platform SDK zu WNetEnumResource:
Zitat:
WNetEnumResource

The WNetEnumResource function continues an enumeration of network resources that was started by a call to the WNetOpenEnum function.

DWORD WNetEnumResource(
HANDLE hEnum,
LPDWORD lpcCount,
LPVOID lpBuffer,
LPDWORD lpBufferSize
);

Parameters
hEnum
[in] Handle that identifies an enumeration instance. This handle must be returned by the WNetOpenEnum function.

lpcCount
[in, out] Pointer to a variable specifying the number of entries requested. If the number requested is ?1, the function returns as many entries as possible.
If the function succeeds, on return the variable pointed to by this parameter contains the number of entries actually read.

lpBuffer
[out] Pointer to the buffer that receives the enumeration results. The results are returned as an array of NETRESOURCE structures. Note that the buffer you allocate must be large enough to hold the structures, plus the strings to which their members point. For more information, see the following Remarks section.
The buffer is valid until the next call using the handle specified by the hEnum parameter. The order of NETRESOURCE structures in the array is not predictable.

lpBufferSize
[in, out] Pointer to a variable that specifies the size of the lpBuffer parameter, in bytes. If the buffer is too small to receive even one entry, this parameter receives the required size of the buffer.


Moderiert von user profile iconTino: Quote-Tags hinzugefügt.


Tino - Mo 14.07.03 09:45

Hi!

Such auch mal hier im Forum nach Suche in: Delphi-Forum, Delphi-Library WNETENUMRESOURCE.

Gruß
Tino