Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーティリティはregsvr32標準出力を抑制します。例えば:
regsvr32
STDAPI DllRegisterServer(void) { std::cout << "RegisterServer\n"; return S_OK; }
実行時:
regsvr32 my.dll
標準出力には何も表示されません (成功メッセージ ボックスが表示されます)。とにかく標準出力を表示させる方法はありますか?
regsvr32.exe Windows アプリケーションです。コンソールを所有していません。printf または std::cout はテキストを表示しません。
何かを表示したい場合は、自分でコンソールを作成できます。
テキスト出力の前に次の行を呼び出します。
AllocConsole(); freopen("CONOUT$", "w+t", stdout);
/c で使用
regsrv32 yourFile.dll /c C://log.txt