//*************************************************************** // From the book "Win32 System Services: The Heart of Windows 98 // and Windows 2000" // by Marshall Brain // Published by Prentice Hall // // Copyright 1995, by Prentice Hall. // // This code removes a directory. //*************************************************************** // dirremov.cpp #include #include void main() { char s[MAX_PATH]; BOOL success; // get name of directory cout << "Enter name of directory to remove: "; cin >> s; success = RemoveDirectory(s); if (!success) cout << "Error code = " << GetLastError() << endl; else cout << "success.\n"; }