Velcro
Velcro

Reputation: 556

System file copying dialog box

Sometimes, setup programs shows the Windows file copy dialog, like this one:

enter image description here

This often appears during driver-level application installation, either on Windows XP or Windows 7.

Which API can perform that?

EDIT

Actually, there is no Cancel button at all on the real dialog box.

Upvotes: 0

Views: 955

Answers (2)

DRL
DRL

Reputation: 19

The Windows API SHFileOperation is declared as follows:

[DllImport("shell32.dll",CharSet = CharSet.Unicode)] static extern int SHFileOperation(ref SHFILEOPSTRUCT lpFileOp);

Specifying [In] for ref SHFILEOPSTRUCT lpFileOp prevents receiving the pointer to any remapped files in ref SHFILEOPSTRUCT.hNameMappings when FOF_WANTMAPPINGHANDLE flag is set.

Upvotes: 1

Steve
Steve

Reputation: 216333

The Windows API is called SHFileOperation. Its signature in C# language is

[DllImport("shell32.dll",CharSet = CharSet.Unicode)]
static extern int SHFileOperation([In] ref SHFILEOPSTRUCT lpFileOp);

If you like an example you could look at this page on PInvoke
This instead is the link to the MSDN documentation on SHFileOperation

Upvotes: 2

Related Questions