给你贴上一段程序.具体的参数含义请看帮助。<br>(这种问题才给50分,太...)<br><br>SHGetDeskTopFolder的用法。SHBrowseForFolder的使用与SHGetDeskTopFolder<br>的使用十分相似.<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>Var<br> pEnumPidl : Array [0..1] Of PItemIDList;<br> pEnum : IEnumIDList;<br> ulNumpidls : Integer;<br> srName : TStrRet;<br> Flags : DWord;<br>begin<br> If pDesktop = Nil Then<br> SHGetDeskTopFolder(pDeskTop);<br><br> Flags :=SHCONTF_FOLDERS Or SHCONTF_NONFOLDERS Or SHCONTF_INCLUDEHIDDEN;<br> pDeskTop.EnumObjects(Handle,Flags,pEnum);<br><br> Repeat<br> pEnum.Next(1,pEnumpidl[0],ulNumpidls);<br> If (ulNumpidls > 0) Then<br> Begin<br> pDesktop.GetDisplayNameOf(pEnumPidl[0],SHGDN_NORMAL,srName);<br> Case srName.uType Of<br> STRRET_CSTR:<br> Begin<br> Memo1.Lines.Add(srName.cStr);<br> End;<br> STRRET_OFFSET:<br> Begin<br> Memo1.Lines.Add(srName.pStr);<br> End;<br> STRRET_WSTR:<br> Begin<br> Memo1.Lines.Add(srName.pOleStr);<br> End;<br> End;<br> End;<br> Until (ulNumPidls = 0);<br><br>// pDesktop._Release();<br>end;<br><br> SHFileOperation的用法。<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>Var<br> FileOp : TShFileOpStruct;<br>begin<br> FileOp.Wnd := Handle;<br> FileOp.wFunc := FO_COPY;<br> FileOp.fFlags := FOF_ALLOWUNDO;<br> FileOp.hNameMappings := Nil;<br> FileOp.lpszProgressTitle := PChar('建立新数据库结构,请稍侯!');<br><br> FileOp.pFrom := PChar(DirectoryEdit1.Text + #0 + #0);<br> FileOp.pTo := PChar(DirectoryEdit2.Text);<br><br> SHFileOperation(FileOp);<br>end;