検索条件
全1件
(1/1ページ)
#define UNICODE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shellapi.h>
HINSTANCE hInstance, hPrevInstance;
LPSTR lpCmdLine;
int nCmdShow;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
SHEmptyRecycleBin(NULL, L"", 0);
return 0;
}
要するに、SHEmptyRecycleBin() を呼ぶだけのプログラム。エントリポイントが main() じゃなく WinMain() なのは、実行時にコンソールを開かないようにするにはこれがお手軽らしいので。お手軽というか、ほかの方法を知らない。