Here is a quick hack.
function SelectDirectoryEx(HWND: HWND; Title: string; Flags: DWORD): string;
var
IDL: PItemIDList;
bi: TBrowseInfo;
DN: array[0..MAX_PATH] of Char;
M: IMalloc;
begin
Result := '';
Fillchar(bi, SizeOf(bi), #0);
with bi do begin
hwndOwner := HWND;
pszDisplayName := DN;
lpszTitle := PChar(Title);
ulFlags := Flags;
end;
IDL := SHBrowseForFolder(bi);
if IDL <> nil then begin
if Flags <> BIF_BROWSEFORCOMPUTER then
SHGetPathFromIDList(IDL, DN);
Result := DN;
end;
SHGetMalloc(M);
M.Free(IDL);
end;
{FLAGS in SelectDirectoryEX
Value specifying the types of folders to be listed in the dialog box as
well as other options.
This member can include zero or more of the following values:
BIF_BROWSEFORCOMPUTER Only returns computers. If the user selects anything
other than a computer,
the OK button is grayed.
BIF_BROWSEFORPRINTER Only returns printers. If the user selects anything
other than a printer,
the OK button is grayed.
BIF_DONTGOBELOWDOMAIN Does not include network folders below the domain
level in the tree view control.
BIF_RETURNFSANCESTORS Only returns file system ancestors. If the user
selects anything other than a
file system ancestor, the OK button is grayed.
BIF_RETURNONLYFSDIRS Only returns file system directories. If the user
selects folders that are not
part of the file system, the OK button is grayed.
BIF_STATUSTEXT Includes a status area in the dialog box. The
callback function can set the status
text by sending messages to the dialog box.
}
-----Original Message-----
From: Donovan J. Edye <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: Thursday, 20 January 2000 11:06 AM
Subject: [DUG]: Computer Names On Network....
G'Day All,
Has someone got some code handy to show all the hosts in the current work
group?? Something along the lines of C:\>NET VIEW???
TIA
------------------------------------------------------------------------
--Donovan
Donovan J. Edye [www.edye.wattle.id.au]
Namadgi Systems, Delphi Developer
Web: www.namsys.com.au E-Mail: [EMAIL PROTECTED]
Voice: +61 2 6285-3460 Fax: +61 2 6285-3459
TVisualBasic = Class(None);
------------------------------------------------------------------------
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz