古い新しいwin32api
このページは、レイモンドチェンの有名なブログThe Old New Thingの投稿のサブセットへのリンクのリストを提供します。サブセットは、主にWin32APIおよびいくつかのcom関連のものに制限されています。
私がこのページを維持している理由は、MSDNに欠落している、またはそこに記述されている情報を不可解な方法で提供することが多いため、またブログが簡単に検索できないためです。
ここのリンクは、時系列の順序ではなく、トピックに分類されます。必要に応じて、単一の投稿を複数のカテゴリに配置する場合があります。
一部の(非常にまれな)ケースでは、他のソースへのリンクが有用であることが判明した場合に含まれています。
免責事項:私はリンクされた内容の著者を主張していません。これは、レイモンドが長年にわたって書いてきた素晴らしい記事の有用な組織についてのみです。
目次
- プロセスとスレッド
- プロセス
- スレッド
- スレッドプール
- オブジェクトのスレッドアフィニティ
- スレッドスタック
- 繊維
- 同期
WaitOnAddress()-
WaitForMultipleObjects()および親relative - ロックフリーパターン
- dlls
- リソース
- ビットマップとアイコンリソース
- ダイアログテンプレート
- メニューテンプレートとアクセラレータリソース
- 文字列リソース
- バージョンテンプレート
- データとカスタムリソース
- アプリケーション(全体として)
HWND (一般的な観点)- Windows階層
- ウィンドウスタイル
- ウィンドウクラス
- トップレベルのウィンドウ
- 窓枠とキャプション
- DWM
- ダイアログ
- ネストされた埋め込みダイアログ
- 一般的なダイアログ
- コントロールナビゲーション
- ダイアログマネージャー
- モダリティ
- プロパティシート
- コントロール
- アニメーションコントロール
- ボタン
- コンボボックス
- コントロールを編集します
- ビューをリストします
- 豊富なテキストコントロール
- スクロールバー
- 静的コントロール
- ツールバー
- ツールチップ
- トラックバー
- ツリーリストビュー
- メッセージの処理
- 特定のメッセージ
- 通知
- 窓の構築と破壊
- ウィンドウジオメトリメッセージ
- ウィンドウペインティングメッセージ
- ウィンドウフォーカスメッセージ
- キーボードメッセージ
- マウスメッセージ
- ダイアログメッセージ
- 他のウィンドウメッセージ
- システムメッセージ
- GDI
- カーソル
- ブラシ
- ペン
- ビットマップ
- ディブ
LockWindowUpdate()- 標準的な要素の塗装
UXTHEME.DLL- 複数のモニター
- アクセシビリティ
- com
- comインターフェイスの宣言
- comアパートメント
- com初期化
- com staticストア
- com Marshaling
- comエラー処理
- com非同期インターフェイス
- ガイド
- com文字列
- comバリアント
IUnknown-
IMoniker -
ICallback -
IContextMenu -
IFileDialog -
IMultiLanguage -
INamespaceWalk -
IStream -
IVirtualDesktopManager - クリップボード
- ドラッグアンドドロップ
- 列挙
- シェル
- 未分類のcomのもの
- メモリ
- 入出力
- セキュリティ権限、属性、識別子
- レジストリ
- 文字列とロケール
- NTサービス
- 未分類
プロセスとスレッド
プロセス
CreateProcessプロセスが開始されるのを待ちませんCreateProcess関数が入力コマンドラインを変更するのはなぜですか?- なぜ人々は
CreateProcessコールの周りに閉じ込められるのですか? - プログラムのクラッシュダイアログの無効化
- 開始時に多くのデータをプロセスに渡すにはどうすればよいですか?
-
WinMainのhPrevInstanceパラメーターの目的は何でしたか? -
RunAsInvoker秘密、さらに高いUAC設定ですか? - 子どものプロセスが[Windowsエラー報告]ダイアログが表示されないようにするにはどうすればよいですか?
-
WriteProcessMemory読み取り専用のメモリに書面で成功するのはどのようになりますか? -
WriteProcessMemory私のページ保護を管理させることをお勧めしますか? - 昇格したプロセスから未解決のプロセスを開始するにはどうすればよいですか、Redux
- プロセスの整合性レベルを確認するにはどうすればよいですか?
- 構造化された例外ハンドラーから構造化された例外を上げることでプロセスが終了するのは本当ですか?
- ジョブオブジェクトにプロセスを作成するためのより直接的で間違いのない方法
スレッド
- 無効なスレッドとプロセスID
- なぜ私のスレッドは突然悪くなるのですか?私がしたのはそれを待つことだけでした!
-
_beginthreadと_beginthreadexに渡されたスレッドコールバックから単に戻るとどうなりますか? - スレッドを一時停止しないでください
- UIスレッドで寝ることの危険
- メッセージキューを追求する
- プロセスでスレッドを列挙します
- Win32ユーザーインターフェイスの作業は、本質的にシングルスレッドです
- スレッドが終了してから長い間スレッドハンドルを閉じるのを遅らせるのはどれほど悪いことですか?
- 確かに終了したことがわかっているスレッドの
GetExitCodeThreadに電話した場合、なぜそれでもSTILL_ACTIVEと言うのですか? - 64ビットシステムの
CreateRemoteThreadに問題はありますか? -
TerminateThread関数は同期ですか? - ジョブオブジェクトが空になるのを待つコードから
TerminateThread削除する FreeLibraryAndExitThreadのポイントは何ですか?- スタックコミットとスタックリザーブに矛盾した価値を与えるとどうなりますか?
スレッドプール
SetThreadpoolTimerのmsWindowLengthパラメーターは正確に何を意味しますか?-
CreateTimerQueueTimerとSetThreadpoolTimerの違いは何ですか? - スレッドプールのコールバックをキャンセルするときに解放されたメモリへのアクセスを避ける方法
- スレッドプールのコールバックをキャンセルするときのデッドロックの回避、パート1:外部コールバックデータ
- スレッドプールのコールバックをキャンセルするときにデッドロックを回避する、パート2:コンテンディングオブジェクトを参照
- Gotcha:ThreadPoolの定期的なタイマーは、前のティックが完了するのを待たないでしょう
- プロセスシャットダウン中にスレッドプールから例外を取得するのはなぜですか?
-
QueueUserWorkItemに渡された関数から返された値はどうなりますか? -
StartThreadpoolIoのメンタルモデル - スレッドプール作業アイテムの時間が長すぎることを検出するにはどうすればよいですか?
- スレッドプールを閉じて、それにキューに入れられたすべての作業をキャンセルするにはどうすればよいですか?
オブジェクトのスレッドアフィニティ
- ユーザーインターフェイスオブジェクトのスレッドアフィニティ、パート1:ウィンドウハンドル
- ユーザーインターフェイスオブジェクトのスレッドアフィニティ、パート2:デバイスコンテキスト
- ユーザーインターフェイスオブジェクトのスレッドアフィニティ、パート3:メニュー、アイコン、カーソル、アクセラレータテーブル
- ユーザーインターフェイスオブジェクトのスレッドアフィニティ、パート4:GDIオブジェクトおよびその他のアフィニティに関するメモ
- ユーザーインターフェイスオブジェクトのスレッドアフィニティ、パート5:オブジェクトクリーンアップ
- ユーザーインターフェイスオブジェクトのスレッドアフィニティ:補遺
スレッドスタック
- 実行時にスレッドのスタックを拡張するにはどうすればよいですか?
- 繊維を使用して、実行時にスレッドのスタックを拡張する、パート1
- ファイバーを使用して、実行時にスレッドのスタックを拡張する、パート2
- ファイバーを使用して、実行時にスレッドのスタックを拡張する、パート3
- ファイバーを使用して、実行時にスレッドのスタックを拡張する、パート4
- ファイバーを使用して、実行時にスレッドのスタックを拡張する、パート5
- ファイバーを使用して、実行時にスレッドのスタックを拡張する、パート6
- 実行時にスレッドのスタックを拡張する目的で、ファイバーをスレッドと比較する
- 使用可能なスタックスペースの量をほぼ決定する、パート1
- 使用可能なスタックスペースの量をほぼ決定する、パート2
繊維
- スレッドが終了するとスレッドで実行された繊維はどうなりますか?
- 繊維を使用するのは問題ありませんが、誰もが計画に参加する必要があります
- 繊維はこれ以上有用ではありません。繊維とは無関係の理由で役立つ隅々があります
同期
WAIT_ABANDONEDの結果を理解する- Windowsキー付きイベント、重要なセクション、および新しいVista同期機能
- 別個のイベントの作業キューを組み合わせることで、順序は重要ではなく、自動リセットイベントと
- 特に読者と作家の両方がいる場合、SRWロックはどの程度公平ですか?
- ファイルも同期オブジェクトとして使用できます。
- カーネルイベントが無信号になるのを待つことはできますか?
- Slim Reader/Writer Lock(
SRWLOCK )が共有ロックの所有者が誰であるかを覚えていない場合、それは再帰的に取得しても大丈夫ですか?
WaitOnAddress()
-
WaitOnAddress使用すると、データ変数、さらにはバイトから同期オブジェクトを作成できます。 -
WaitOnAddress観点から同期障壁を実装します WaitOnAddressの観点から重要なセクションを実装します- タイムアウトをサポートするために
WaitOnAddressに基づいて重要なセクションを拡張する WaitOnAddressとFutexesを比較する(Futexi?Futexen?)-
WaitOnAddressからセマフォを作成します WaitOnAddressから最大数のセマフォを作成しますWaitOnAddressからマニュアルリセットイベントを作成しますWaitOnAddressから自動リセットイベントを作成します
WaitForMultipleObjects()および親relative
-
MsgWaitForMultipleObjectsおよびキュー状態 - ゼロのハンドルで
MsgWaitForMultipleObjectsを呼び出すことができます - 一定期間待っている間にメッセージをポンピングします
MsgWaitForMultipleObjectsですべてのハンドルを待つのは、起こるのを待っているバグです- すべてのパラメーターが私に有効に見えるのに、なぜ
WaitForMultipleObjects ERROR_INVALID_PARAMETERを返すのですか? - 複数のオブジェクトが
WaitForMultipleObjects返している場合、他のオブジェクトについてどうすればわかりますか? -
MsgWaitForMultipleObjectsに無信号のイベントを渡すことのポイントは何ですか?
ロックフリーパターン
- ロックフリーの多数生産者/単一消費者パターン:タスクの合体を伴う作業キュー
- ロックフリーの多数生産者/単一消費者パターン:最後のものが勝つ作業キュー
- ロックフリーの多数生産者/単一消費者パターン:同一の非コーテル不可能なイベントの作業キュー
- ロックフリーの多数生産者/単一消費者パターン:個別のイベントの作業キュー、注文は重要ではありません
- ロックフリーの多数生産者/単一消費者パターン:個別のイベントの作業キュー、FIFO
- ロックフリー多数生産者/単一消費者パターン:個別のイベントの作業キュー、重要ではない、フォローアップの質問
dlls
- 返品住所を信用しないでください
- なぜ私がdllexportをした関数
GetProcAddressができないのですか? -
HINSTANCEとHMODULEの違いは何ですか? - 静的ライブラリから現在のモジュールの
HINSTANCEにアクセスします LoadLibraryEx(DONT_RESOLVE_DLL_REFERENCES)根本的に欠陥があります- なぜDLLが「間違った」順序でアンロードされるのですか?
- DLL関数は32ビットウィンドウでどのようにエクスポートされますか?
- 本当にフォワーダーであるエクスポートされた機能
- DLLエクスポートが32ビットウィンドウの解決方法を再考する
- インポートライブラリの名前は理由で装飾されています
- dllimportが間違っているとどうなりますか?
- インポートされた機能のためにスタブを作成することに関連する問題
- モジュールの境界を越えてメモリを割り当てて解放します
- DLL転送は、遅延ロードと同じではありません
- DLLインポートヒントとは何ですか?
- DLLインポートバインディングとは何ですか?
-
FreeLibraryAndExitThreadのポイントは何ですか? -
LOAD_LIBRARY_AS_DATAFILE (または同様のフラグ)を介してロードされたライブラリは、トナカイモジュールゲームで再生できません - あなた自身のプロセスで
GetModuleFileNameEx呼び出すことに問題はありますか? - DLLがDLLがあるのと同じディレクトリからDLL依存関係を解決する必要があることをどのように指定できますか?
- DLLを別のDLLを遅らせると、DLLがそのプロセスでクラッシュし始めました。
- さまざまな種類のDLL植え付け
GetModuleInfo実行可能ファイルのエントリポイントを作成できないのはなぜですか?-
MODULEINFO構造のSizeOfImageどういう意味ですか? -
LoadLibrary失敗したときに表示されるエラーボックスを抑制するにはどうすればよいですか?
DllMain()
- あなたの
DllMainで怖いことをしないいくつかの理由 - あなたの
DllMainで怖いことをしないもう1つの理由:不注意なデッドロック - あなたの
DllMainで怖いことをしないいくつかの理由、パート3 -
DLL_PROCESS_DETACH通知を取得するスレッドは、必ずしもDLL_PROCESS_ATTACH notification取得したものではありません DLL_PROCESS_DETACH中にDLLをどのようにロードしているのかさえ気付かずにDLL_PROCESS_DETACHプロセスが終了していると言うとき、あなたの最善の策は何もせずに戻ることです
リソース
- リソースコンパイラは、ファイルがUTF-8であるという微妙なヒントに直面しても、
CP_ACPにデフォルトです - 32ビットウィンドウのモジュールリソースとリソース由来のオブジェクトとの関係
FreeResourceと、たとえばDestroyAcceleratorTableの違いは何ですか- PEリソースは4バイトに合わせている必要がありますが、それは人々が他のアライメントを試みるのを止めません
- 誰かが
MAKEINTRESOURCEマクロを使用してポインター内の整数を密輸したことをどのように伝えることができますか? - 恐ろしい厄介なゴッチャ:
FindResourceとFindResourceEx
ビットマップとアイコンリソース
- デバイスに依存しないビットマップが逆さまになっているのはなぜですか?
- ビットマップリソースの形式
- アイコンリソースの形式
- アイコンリソースの形式、再訪
- ICOファイル形式の進化、パート1:モノクロの始まり
- ICOファイル形式の進化、パート2:今色になりました!
- ICOファイル形式の進化、パート3:アルファブレンド画像
- ICOファイル形式の進化、パート4:PNG画像
- GDIビットマップのアルファチャネルを255に設定するにはどうすればよいですか?
メッセージ文字列リソース
FormatMessage末尾の%0ラインなしでメッセージを終了すると言っているのはなぜですか?密かに新しいラインを追加していますか?
ダイアログテンプレート
- win32ダイアログテンプレートでpixel-perfectレイアウトを取得することの難しさについて
- ダイアログテンプレートの進化-32ビットクラシックテンプレート
- ダイアログテンプレートの進化-32ビット拡張テンプレート
- ダイアログテンプレートの進化 - 要約
- リソースコンパイラは有益にウィンドウスタイルを追加しますが、自分でダイアログテンプレートを作成している場合、そのヘルプは得られません
メニューテンプレートとアクセラレータリソース
- メニューテンプレートの進化:はじめに
- メニューテンプレートの進化:32ビットクラシックメニュー
- メニューテンプレートの進化:32ビット拡張メニュー
- アクセラレータテーブルリソースの形式
文字列リソース
- 文字列リソースの形式
LoadString埋め込まれたヌルを文字列でロードできますが、ラッパー関数はそうではないかもしれません
バージョンテンプレート
- バージョンリソースの進化-32ビットバージョンリソース
- バージョンリソースの進化 - 破損した32ビットバージョンリソース
データとカスタムリソース
アプリケーション(全体として)
-
Alt+Tabリストに表示されるWindowsはどれですか? - Windows Vistaは、
Alt+Tab Orderをわずかに変更しました - Win32ユーザーインターフェイスの作業は、本質的にシングルスレッドです
STARTF_USESHOWWINDOWいつShowWindowに渡されたパラメーターをオーバーライドしますか?-
WaitForInputIdle本当にWaitForProcessStartupCompleteと呼ばれる必要があります WaitForInputIdleスレッドを待機しますが、これはあなたが気にかけているスレッドではないかもしれません- 標準ハンドルを管理するための慣習は何ですか?
- 標準ハンドルは、単一の読み取りプログラムを目的としています
- DLLのみが
DllMain通知を取得できる場合、スレッドが作成されたときにEXEはどのように通知を受信できますか(たとえば)?
コマンドライン
- コマンドラインの最初の単語は、コンベンションのみでプログラム名です
CommandLineToArgvW機能はどのように使用されることを目的としていますか?-
CommandLineToArgvWによる引用符とバックスラッシュの奇妙な扱いはどうですか
タスクバー
- ユーザーがプログラムをタスクバーに固定できないようにするにはどうすればよいですか?
- 何かを作成してからそれを隠そうとする代わりに、そもそもそれを作成しないでください(トレイアイコン)
- 私のアプリケーションが実際に2つのアプリケーションが単一のファイルにバンドルされ、Windows 7のタスクバーの2つのグループに収集したい場合はどうなりますか?
- アプリケーションウィンドウをタスクバーでグループ化する方法をカスタマイズするにはどうすればよいですか?
- タスクバーボタンにオーバーレイを表示します
- タスクバープレビューウィンドウにコントロールボタンを表示します
- アプリケーション用のカスタムサムネイルを表示します(およびカスタムライブプレビューに参加している間)
- セカンダリモニターのタスクバーの場所を照会するにはどうすればよいですか?
- そのプログラムは、どのようにしてタスクバーにインストールしたときに自分自身をピン留めしましたか?
- 論理的に単一のアプリケーションである2つのプログラムがあり、タスクバーの単一グループとして扱われたい場合はどうなりますか?
- グループ化されたウィンドウのタスクバーアイコンが奇妙なものに変更されるのはなぜですか?
HWND (一般的な観点)
- ウィンドウがユニコードであるとはどういう意味ですか?
- サンクではなく、実際のウィンドウ手順アドレスを取得するにはどうすればよいですか?
-
GWLP_WNDPROCから返されたこれらの奇妙な値は何ですか? -
GWLP_USERDATAのボーナスウィンドウバイト WM_DESTROYとWM_NCDESTROYの違いは何ですか?- 窓を送る
WM_DESTROYメッセージは、警察のふりをして誰かを呼ぶいたずらのようなものです GetWindowTextの秘密の生活GetWindowTextのルールがそんなに奇妙なのはなぜですか?- 画面に窓が表示されている場合にのみペイント
- ウィンドウがカバーされているかどうかを判断します
- 最小化中にウィンドウのサイズと位置を取得する
SetForegroundWindowを呼び出すのはなぜすぐにGetForegroundWindowが同じウィンドウを返さないのですか?- Windowsは、新しく作成されたウィンドウがLTRレイアウトを使用するか、RTLレイアウトを使用するかどうかをどのように決定しますか?
Windows階層
- デスクトップウィンドウの何がそんなに特別なのですか?
- 窓の営巣制限は何ですか?
-
HWND_TOPとHWND_TOPMOSTの違いは何ですか? - ウィンドウには親または所有者を持つことができますが、両方ではありません
- なぜ私のコントロールは、私がそれを賠償した後、その通知を間違ったウィンドウに送るのですか?
-
WindowFromPoint 、 ChildWindowFromPoint 、 RealChildWindowFromPoint 、それはいつ終わりますか? -
GetParent 、 EnumClawと同じように混乱しますが、実際の機能です! ( GetAncestor() 、 GetWindow() ) - 別のプロセスから所有者のウィンドウを持つことは注意が必要ですが、それは時々正しいことです
- UI状態の同期について私に教えようとしている
SetParentのドキュメントは何ですか? - 親と子の窓が異なるUI状態を持っているときに何が起こるかを示す
- 同じUIの状態を持つように親と子の窓を取得する
ウィンドウスタイル
- どのウィンドウスタイルのビットが誰に属しますか?
- ウィンドウに右から左のレイアウトルールに従うことを望んでいることを示すにはどうすればよいですか?
- なぜ私の透明な静的制御は透明ではないのですか? (
WS_EX_TRANSPARENT ) - ケーキのように、
WS_EX_TRANSPARENTは嘘です、または少なくとも真実全体ではありません - 私は
WS_EX_COMPOSITED使用して私の再描画フリッカーを取り除きましたが、それは応答が遅くなりました WS_CLIPCHILDREN使用して、透明な背景でコントロールを引き出すことができるにはどうすればよいですか?
ウィンドウクラス
HINSTANCEは、 CreateWindowとRegisterClassに使用されるものに何を渡しますか?-
RegisterClassで間違ったHINSTANCEを使用することは、個人情報の盗難のようなものです RegisterClass関数がカスタムバックグラウンドブラシの所有権を取得する場合、なぜ漏れているのですか?- ウィンドウクラスの変更は、そのクラスに属するすべてのウィンドウに影響します
CS_SAVEBITS何をしますか?-
CS_OWNDCクラススタイルは何をしますか? -
CS_CLASSDCクラススタイルは何をしますか? -
CS_NOCLOSEスタイルを変更すると、クラスのすべてのウィンドウに影響しますが、必ずしもすぐに目立つ方法ではありません PrintWindow CS_PARENTDC嫌うのはなぜですか?誰もがCS_PARENTDC嫌っているからです!-
PrintWindow CS_PARENTDC嫌うのはなぜですか? redux - より安全なサブクラス
- プライベートクラス、スーパークラス、グローバルサブクラス化
GetClassNameよりもRealGetWindowClassにリアルなのはなぜですか?-
CreateWindowExなぜ拡張スタイルパラメーターを最後ではなく最初のパラメーターとして取るのですか? - いつ
CS_GLOBALCLASSを使用する必要がありますか? -
SetWindowSubclass呼び出すとき、uidsubclassパラメーターはどれほどユニークでなければなりませんか?
トップレベルのウィンドウ
窓枠とキャプション
- キャプションアイコンのカスタム右クリックメニューを取得します
- アクティブでなくてもアクティブに見えるキャプションを描画します
- フルウィンドウのドラッグ/1つのウィンドウのサイズを抑制するにはどうすればよいですか?
- 通常とフルスクリーンの間にウィンドウを切り替えるにはどうすればよいですか?
- キャプションバーのボタンを最小化、最大化、閉じることを有効にし、無効にするにはどうすればよいですか?
- タイトルバーの閉じるボタンの場所を取得する
- Windows 2000またはWindows XPから、タイトルバーの閉じるボタンの場所を取得する
- 最大化されたウィンドウの寸法がモニターよりも大きいのはなぜですか?
- 一方向のみでサイズ変更できるウィンドウを作成する
WM_GETMINMAXINFO転送して結果をクランプしてみませんか?
DWM
- 象徴的な表現を求めたときに、私のプログラムが
WM_DWMSENDICONICTHUMBNAILメッセージを受け取らないのはなぜですか? -
DwmExtendFrameIntoClientArea機能へのMARGINSパラメーターは、フレームがクライアント領域にどの程度伸びるかを制御します - ウィンドウを非表示または表示したときに発生するデフォルトのアニメーションを抑制するにはどうすればよいですか?
- アプリケーション用のカスタムサムネイルを表示します(およびカスタムライブプレビューに参加している間)
- ウィンドウがシェルによって画面から抑制されたことを検出するにはどうすればよいですか? (「ウィンドウクローキング」)
ダイアログ
- ダイアログボックスを作成できないのはなぜですか?ルーキーミス#1
- ダイアログボックスを作成できないのはなぜですか?ルーキーミス#2
- ダイアログ手順から値を返します
- 異なるタイプのダイアログ手順
- 別の異なるタイプのダイアログ手順
- すべてのダイアログボックスへのデフォルトの回答は「キャンセル」です
- Zオーダーの回転
TABキーを使用して、非ダイアログでナビゲートしますTABキーを使用して、非ダイアログ、Reduxをナビゲートします- [コントロール]テキストの編集がダイアログボックスで自動選択されるのを防ぐ
- ダイアログマネージャーを理解していない人は、それを再実装する運命にあります
WM_GETDLGCODEの他のトリックGetDialogBaseUnitsは廃人ですMapDialogRectマッピングダイアログの長方形がないのはなぜですか?- ダイアログボックスが最初に隠されているのはなぜですか?
-
DS_SHELLFONTフラグとの取引は何ですか? -
DS_SHELLFONT = DS_FIXEDSYS | DS_SETFONT ? - ダイアログボックスにフォーカスを設定する方法
- 障害のあるコントロールに焦点を当てないでください
- 前のウィンドウ位置を復元する際の微妙さ
- あなたがすでに知っていること:何かをする前にダイアログボックスが表示されるまで待つにはどうすればよいですか?
-
TranslateAccelerator何をしますか? - カスタムアクセラレータを備えたモットレスダイアログボックスがある場合、最初に電話する必要があります:
IsDialogMessageまたはTranslateAccelerator - 穏やかなリマインダー:ダイアログボックスで、OKを与えないでアクセラレータをキャンセルしないでください
- 隠されたコントロールのアクセラレータがまだ活動しているのはなぜですか?
- メインウィンドウで使用された場合にのみアクセラレーターを適用するにはどうすればよいですか。ユーザーがモットレスダイアログを使用している場合は?
-
WS_TABSTOPとしてマークしたコントロールでTABキーが機能しないのはなぜですか? - ダイアログボックスで
WM_USERメッセージを使用することはできません - 実行時にダイアログボックスを左にするにはどうすればよいですか?
- ダイアログマネージャーは、文字の平均幅をどのように計算しますか?
ネストされた埋め込みダイアログ
DS_CONTROLスタイルは何ですか?-
DS_CONTROLスタイルの使用に関するメモ - ダイアログボックスの複数のコントロールを同じIDを提供することは良い考えではありません
- ダイアログを別のダイアログに埋め込むときは、誤って重複するコントロールIDを作成しないようにしてください
- デフォルトのPushbuttonが呼び出されると、Invokeはトップレベルのダイアログに移動します
一般的なダイアログ
MessageBoxが適切な場所にラップされないのはなぜですか?- ファイルを開くダイアログのお気に入りのリンクセクションをカスタマイズするにはどうすればよいですか?
- 一般的なファイルダイアログが現在のディレクトリを変更するのはなぜですか?
- ワイルドカードで一般的なファイルダイアログをフィルタリングできます
- Find Printersダイアログをプログラムで表示するにはどうすればよいですか?
- 共有フォルダーのスナップインのオープンファイルリストがすべてのオープンファイルをすべて表示しないのはなぜですか?
- エクステンションを関連付けるための一般的なコントロールは非常に遅れています
- [フォルダ]ダイアログの参照に表示されるフォルダのフィルタリング
- 特定のフォルダーが事前に選択されたクラシックフォルダーブラウザダイアログを開く
- 一般的なファイルの保存ダイアログが一時ファイルを作成してから削除するのはなぜですか?
- 標準のカラーピッカーダイアログのカスタマー
- ファイルを開くダイアログの初期ディレクトリを仮想ディレクトリに設定するにはどうすればよいですか?
- ファイルを開くダイアログで複数のファイルを選択したとき、最後のアイテムが最初に来るのはなぜですか?
-
OPENFILENAME構造でOFN_NONETWORKBUTTONオプションを設定しましたが、ナビゲーションペインのネットワークアイテムには影響しません - 一般的なファイルを開くまたはファイル保存ダイアログにカスタムコントロールを追加するにはどうすればよいですか?
-
FileOpenPickerまたはFolderPickerによって選択された同じフォルダーでFileSavePickerを開くにはどうすればよいですか? (Win32/com同等の投稿の最後に言及されています)
コントロールナビゲーション
TABキーを使用して、非ダイアログでナビゲートしますTABキーを使用して、非ダイアログ、Reduxをナビゲートします- アクセラレータのUI状態を管理し、長方形に焦点を合わせます
- ダイアログボックスでのカスタムナビゲーション、Redux
- ダイアログボックスは、最後に切り替えたときにフォーカスがあったコントロールに焦点を返します。自分の窓のためにそのアクションに参加するにはどうすればよいですか?
- win32ダイアログで非円形のタブオーダー、または他のタイプのカスタム注文を作成するにはどうすればよいですか?
ダイアログマネージャー
- ダイアログマネージャー、パート1:ウォームアップ
- ダイアログマネージャー、パート2:フレームウィンドウの作成
- ダイアログマネージャー、パート3:コントロールの作成
- ダイアログマネージャー、パート4:ダイアログループ
- ダイアログマネージャー、パート5:非モーダルダイアログボックスをモーダルに変換する
- ダイアログマネージャー、パート6:メッセージループの微妙さ
- ダイアログマネージャー、パート7:メッセージループのその他の微妙さ
- ダイアログマネージャー、パート8:ダイアログボックスのカスタムナビゲーション
- ダイアログマネージャー、パート9:ダイアログボックスのカスタムアクセラレータ
モダリティ
- Windowsを無効にして有効にするための正しい順序
- モダリティ、パート1:UIモダリティとコードモダリティ
- モダリティ、パート2:コードモダリティとUIモダリティ
- モダリティ、パート3:
WM_QUITメッセージ - モダリティ、パート4:モーダルUIの正しい所有者を設定することの重要性
- モダリティ、パート5:モーダルUIの正しい所有者の設定
- モダリティ、パート6:モーダルになったプログラムとの対話
- モダリティ、パート7:タイム付き
MessageBox 、安いバージョン - モダリティ、パート8:タイムされた
MessageBox 、より良いバージョン - モダリティ、パート9:モーダルUIの正しい所有者の設定、実践試験
- スレッドメッセージはモーダルループで食べられます
- メッセージフィルターを介してモーダルループからスレッドメッセージを救助します
プロパティシート
DS_SHELLFONTプロパティシートページに他にどのような効果がありますか?-
PSM_ISDIALOGMESSAGEは、 IsDialogMessageがモードレスダイアログボックスにあるため、モードレスプロパティシートに向けています - あなたはあなた自身のボーナスデータで
PROPSHEETPAGE構造を拡張することができます - Wizardページがアクティブ化されるたびに
PSN_SETACTIVE通知が送信されます PROPSHEETPAGE構造に追加のペイロードを追加します- さまざまなサイズの
PROPSHEETPAGE構造をPropertySheetに渡すにはどうすればよいですか?
コントロール
- あなたがコントロールだからといって、あなたが必ずしもダイアログボックスの中にいるという意味ではありません
アニメーションコントロール
- シェルアニメーションコントロールの制限
- バージョン6アニメーション制御がバックグラウンドスレッドを使用しないのはなぜですか?
ボタン
BS_PUSHLIKEボタンスタイルは何ですか? (使用しないでください、最近は完全に時代遅れです。代わりにチェックボックスまたはラジオボタンを使用してください。)
コンボボックス
- アイテムをコンボボックスまたはリストボックスに追加するスピード違反(
WM_SETREDRAW )
コントロールを編集します
EM_SETHILITEメッセージとの取引は何ですか?- [コントロール]テキストの編集がダイアログボックスで自動選択されるのを防ぐ
- パスワードの編集コントロールで
CapsLock警告を抑制するにはどうすればよいですか? -
ES_NUMBER編集コントロールスタイルの初期の歴史 ES_NUMBER編集制御スタイルで負の数を許可するにはどうすればよいですか?- マイナスサインを編集コントロールに入力するにはどうすればよいですか?
ビューをリストします
- 位置付けられていないvs.非ポジションリストビュービュー
- 折り畳まれた展開されているlistViewアイテムのインフォティップを表示します
- コンピューティングListViewバックグラウンドのインフォティップ
LVM_HITTESTとLVM_INSERTMARKHITTESTの違いは何ですか?- すでに完全に優れた
LVN_ITEMCHANGED通知があるのに、なぜLVN_ODSTATECHANGED通知があるのですか? - 一部のアイテムのチェックボックスでリストビューを作成しますが、他のアイテムではありません
- コンテンツに適合するようにListView列をプログラムでサイズ変更するにはどうすればよいですか?
- ListViewアイテムの無効なチェックボックスを作成するにはどうすればよいですか?
- アイテムをコンボボックスまたはリストボックスに追加するスピード違反(
WM_SETREDRAW )
豊富なテキストコントロール
マレー・サージェントのricheditコントロールの歴史(この投稿は、https://blogs.msdn.microsoft.com/murrays/2006/10/19/some-lichedit-history/への(壊れた)リンクです)- ファイル全体をリッチテキストコントロールにロードするにはどうすればよいですか?
- 32,000文字以上を豊富なテキストコントロールに入れるにはどうすればよいですか?
- 豊富なテキストコントロールの内容を印刷するにはどうすればよいですか?
スクロールバー
- スクラッチプログラム
- スクロールバー、パート2
- スクロールバー、パート3:ペイントサイクルの最適化
- Scrollbars、パート4:比例したスクロールバーの追加
- パート5:スクロールバーのキーボードアクセシビリティ
- パート5への補遺:キーボードコードの微妙さ
- スクロールバーパート6-ホイール
- Scrollbarsパート7-統合
- Scrollbarsパート8-積分インタラクティブなサイズ変更
- Scrollbarsパート9-メタファーの維持
- Scrollbarsパート10-
WM_NCCALCSIZEメッセージのより深い理解に向けて - Scrollbarsパート11:
WM_NCCALCSIZEメッセージのさらに深い理解に向けて - Scrollbars Part 11からの運動への回答
- Scrollbarsパート12:
WM_NCCALCSIZEをスクロールバーサンプルに適用します - Scrollbars Redux:パート12
- スクロールバーには2つのタイプがあります
- 100や10のようなはるかに便利な値ではなく、
WHEEL_DELTAが120に選ばれたのはなぜですか? - なぜ水平スクロールバーの範囲を初めて設定するのは、垂直範囲を設定するのはなぜですか?
- ドラッグの自動クロール、パート1:基本的な実装
- ドラッグの自動クロール、パート2:マウスを小刻みに動くと、なぜスクロールが速くなるのですか?
- ドラッグの自動クロール、パート3:マウスの位置に基づく動的自動装置
- ドラッグの自動クロール、パート4:エスケープ速度に基づく動的自動装置
- ドラッグの自動クロール、パート5:速度をエスケープするためにウィグルからスクロールを追加する
静的コントロール
- 静的コントロールはいつロードされた画像を自動的に削除しますか?それはいつアプリケーションの責任ですか?
タブコントロール
- タブコントロールを備えたダイアログボックスにコントロールを作成するにはどうすればよいですか?
- Win32タブコントロールの子供をどのように作成することになっていますか?
ツールバー
- なぜ
TBSTYLE_EX_VERTICALとCCS_VERT両方があるのですか? - タスクバーにあるツールバーを作成するにはどうすればよいですか?
- 右に調整されたツールバーボタンを作成するにはどうすればよいですか?
- ジャンプリストにカスタムタスクを作成します
ツールチップ
- コーディングインプレースツールチップ
- ツールチップでカスタムドローを使用して、フォントを調整します
- 複数のツールをツールチップ内の1つにマルチプレックスします
- ツールチップテキストを動的に生成します
- 無効なウィンドウのツールチップを表示できないのはなぜですか?
-
TTM_RELAYEVENT過剰に文書化し、それがツールチップが表示されている限り1秒の周期タイマーを実行する理由
トラックバー
- トラックバーを1つのユニットだけで移動するための
Ctrl +矢印アクセラレータの追加、パート1:初期プランジ - トラックバーを1つのユニットだけで移動するための
Ctrl +矢印アクセラレータを追加する、パート2:セカンドトライ - ユーザーがマウスを使用してトラックバーの親指を5つの倍数ではない位置にドラッグするのを防ぐにはどうすればよいですか?パート1:問題を再構成します
- ユーザーがマウスを使用してトラックバーの親指を5つの倍数ではない位置にドラッグするのを防ぐにはどうすればよいですか?パート2:親指の位置を微調整します
ツリーリストビュー
TVS_CHECKBOXESスタイルは風変わりで、それがクレイジーだと言う丁寧な方法ですTVS_CHECKBOXESスタイルを使用する場合、リークされた画像リストに注意してください- ツリービューの作成チェックボックスを手動で:シンプルな状態画像リスト
- ツリービューの作成チェックボックスを手動で使用します。クリックに応答します
- ツリービューの作成チェックボックスを手動で:テーマにしたチェックボックス
- ツリービューチェックボックス:劣った歴史
- ツリービューチェックボックス:拡張されたチェックボックスの状態
メッセージの処理
- どのメッセージ番号が誰に属しますか?
- メッセージを送信するさまざまな方法
- ユーザー定義のメッセージをブロードキャストします
- スレッドはいつウィンドウメッセージを受信できますか?
-
GetKeyStateとGetAsyncKeyStateの違いは何ですか? - スレッドメッセージはモーダルループで食べられます
- メッセージフィルターを介してモーダルループからスレッドメッセージを救助します
- ウィンドウメッセージをフィルタリングする危険性
PostMessageでキーボード入力をシミュレートすることはできません- 一定期間待っている間にメッセージをポンピングします
- メッセージキューを追求する
- いいえ、本当に、あなたはすべての未処理のメッセージを
DefWindowProcに渡す必要があります - メッセージを処理するコードがある場合でも、とにかくそれをやっていたので、
DefWindowProcに電話することができます - これまでに使用された
Get/SetMessageExtraInfoは何でしたか? -
GetWindowLongPtr 64ビットウィンドウでゴミ値を返すのはなぜですか? -
TrackMouseEventウィンドウ内のマウスイベントを追跡しますが、イベントが窓に属する場合のみ - ロック階層にメッセージキューを含めることを忘れないでください
SendMessageTimeoutタイムアウトに達すると、送信されたメッセージはどうなりますか?-
WM_COPYDATAメッセージをPostMessageできSendMessageTimeoutのはなぜですか? - マウス - ムーブ、ペイント、およびタイマーメッセージはオンデマンドで生成されますが、キューに入ることはまだ可能です
- 投稿されたメッセージは、後で投稿されたとしても、入力メッセージの先に処理されます
- メッセージのみのウィンドウはどのようなメッセージを受信できますか?
-
DispatchMessageAとDispatchMessageWのプロトタイプが同一である場合、なぜ両方があるのですか? - ダイアログマネージャーを理解していない人は、それを再実装する運命にあります
- 内部アプリケーションの状態の一部を変更した後、マウスカーソルの再計算をトリガーするにはどうすればよいですか?
- 内部アプリケーションの状態の一部を変更した後、マウスカーソルの再計算をトリガーするにはどうすればよいですか?
-
GetQueueStatusとキュー状態
フック
SetWindowsHookExに渡されたHINSTANCE何を使用していますか?- How can I get notified when the cursor changes?
- What does the thread parameter to
SetWindowsHookEx actually mean? - Why does
SetFocus fail without telling me why?
Specific Messages
通知
- What's the difference between the
wParam of the WM_NOTIFY message and the idFrom in the NMHDR structure. - Restating the obvious about the
WM_COMMAND message - Restating the obvious about the
WM_NOTIFY message
Window Construction and Destruction
- What is the difference between
WM_DESTROY and WM_NCDESTROY ? - How can I determine the reason why my window is closing? (
WM_CLOSE )
Window Geometry Messages
- Use
WM_WINDOWPOSCHANGED to react to window state changes - Use
WM_WINDOWPOSCHANGING to intercept window state changes
Window Painting Messages
- Paint messages will come in as fast as you let them (
WM_PAINT ) - What happens if I don't paint when I get a
WM_PAINT message? - What is the implementation of
WM_PRINTCLIENT ? - There's a default implementation for
WM_SETREDRAW , but you might be able to do better - Speeding up adding items to a combobox or listbox (
WM_SETREDRAW ) - Using
WM_SETREDRAW to speed up adding a lot of elements to a control
Window Focus Messages
-
WM_KILLFOCUS is the wrong time to do field validation - The dangers of playing focus games when handling a
WM_KILLFOCUS message - Why doesn't the
MoveWindow function generate the WM_GETMINMAXINFO message?
Keyboard Messages
- How do I respond to the
WM_MENUCHAR message?
Mouse Messages
- Why is there no
WM_MOUSEENTER message? - Why do I get spurious
WM_MOUSEMOVE messages? - Sure, I can get spurious
WM_MOUSEMOVE messages, but why do they keep streaming in? - How do I get mouse messages faster than
WM_MOUSEMOVE ? - Logical consequences of the way Windows converts single-clicks into double-clicks
- Implementing higher-order clicks
- How slow do you have to slow-double-click for it to be a rename?
- How can I prevent the mouse from moving in response to touch input?
Dialog Messages
- Those who do not understand the dialog manager are doomed to reimplement it, badly
- Managing the UI state of accelerators and focus rectangles (
WM_CHANGEUISTATE , WM_QUERYUISTATE and WM_UPDATEUISTATE ) - Untangling the confusingly-named
WM_UPDATEUISTATE and WM_CHANGEUISTATE messages - Who sends the initial
WM_UPDATEUISTATE message? - How can I prevent the keyboard focus rectangle from appearing on a control I created?
- Other tricks with
WM_GETDLGCODE - How do I prevent multi-line edit controls from eating the Enter key?
- Why do
DLGC_WANTALLKEYS and DLGC_WANTMESSAGE have the same value?
Other Window Messages
- The dangers of messing with activation when handling a
WM_ACTIVATE message - Why does my window get a
WM_ACTIVATE message when it isn't active? - A timed context menu (
WM_CANCELMODE ) - Pitfalls in handling the
WM_CONTEXTMENU message ( WM_CONTEXTMENU ) -
WM_NCHITTEST is for hit-testing, and hit-testing can happen for reasons other than the mouse being over your window - How likely is it that a window will receive a
WM_NULL message out of the blue? ( WM_NULL ) - Why is there a special
PostQuitMessage function? ( WM_QUIT ) - How does
PostQuitMessage know which thread to post the quit message to? ( WM_QUIT ) - Who is responsible for destroying the font passed in the
WM_SETFONT message? ( WM_SETFONT ) - When I send a
WM_GETFONT message to a window, why don't I get a font? ( WM_GETFONT ) - If my
WM_TIMER handler takes longer than the timer period, will my queue fill up with WM_TIMER messages? - Killing a window timer prevents the
WM_TIMER message from being generated for that timer, but it doesn't retroactively remove ones that were already generated
System Messages
- If one program blocks shutdown, then all programs block shutdown (
WM_QUERYENDSESSION , WM_ENDSESSION ) - Why do I have to return this goofy value for
WM_DEVICECHANGE ? ( WM_DEVICECHANGE ) - Windows doesn't close windows when a user logs off; that's your call (
WM_ENDSESSION ) - Once you return from the
WM_ENDSESSION message, your process can be terminated at any time ( WM_ENDSESSION )
GDI
- Why are
RECT s endpoint-exclusive? - Can you create an information context for the display?
- What does the
CS_OWNDC class style do? - What does the
CS_CLASSDC class style do? - How do you detect "Large Fonts"? (DPI)
- Drawing a monochrome bitmap with transparency
- Let GDI do your RLE compression for you
- The mysterious stock bitmap: There's no way to summon it, but it shows up in various places
- Why is my icon being drawn at the wrong size when I call
DrawIcon ? - You must flush GDI operations when switching between direct access and GDI access, and direct access includes other parts of GDI
- How do I get the dimensions of a cursor or icon?
- What are the dire consequences of not selecting objects out of my DC?
- Of what use is the
RDW_INTERNALPAINT flag? - Functions that return GDI regions rarely actually return regions
- Color-aware ClearType requires access to fixed background pixels, which is a problem if you don't know what the background pixels are, or if they aren't fixed
- What is the correct way of using
SaveDC and RestoreDC ? - How are
BitBlt raster opcodes calculated? - Notes on
DrawText and tab stops - Why doesn't
GetTextExtentPoint return the correct extent for strings containing tabs? - Why are there trivial functions like
CopyRect and EqualRect ? - More on trivial functions like
CopyRect and EqualRect - What are the consequences of increasing the per-process GDI handle limit?
- The focus rectangle says, “I'm not orange. I'm just drawn that way.”
Cursors
- The effect of
SetCursor lasts only until the next SetCursor - What can or should I do with the cursor handle returned by
SetCursor ? - What is the deal with the
SM_CXCURSOR system metric? - How do I find out the size of the mouse cursor?
ブラシ
- The hollow brush
- Other uses for bitmap brushes
- What is the DC brush good for?
- I know I can change the color of the DC pen, but what about the other attributes?
- How can I extract the color from a solid color GDI brush?
Pens
- Is there a difference between creating a null pen with
CreatePen and just using the stock null pen?
Bitmaps
- How do I set the alpha channel of a GDI bitmap to 255?
DIB
- A survey of the various ways of creating GDI bitmaps with predefined data
- Blitting between color and monochrome DCs
- Manipulating the DIB color table for fun and profit
- Using DIB sections to perform bulk color mapping
- The fun and profit of manipulating the DIB color table can be done without having to modify it
- Separating the metadata from the DIB pixels: Precalculating the
BITMAPINFO - Separating the metadata from the DIB pixels: Changing the raster operation
- The disembodiment of DIBs from the DIB section
- What is the
hSection parameter to CreateDIBSection for?
LockWindowUpdate()
- What does
LockWindowUpdate do? - How is
LockWindowUpdate meant to be used? - With what operations is
LockWindowUpdate meant to be used? - With what operations is
LockWindowUpdate not meant to be used? - Final remarks on
LockWindowUpdate
Painting Standard Elements
- Rendering standard Windows elements
- Rendering menu glyphs is slightly trickier
- What states are possible in a
DRAWITEMSTRUCT structure?
UXTHEME.DLL
-
BeginBufferedPaint : It's not just for buffered painting any more - How do
IsThemeActive , IsAppThemed , and IsCompositionActive differ? - How do I get the tabbed dialog effect on my own custom tabbed dialog?
- How do I revert a control back to its default theme?
Multiple Monitors
- For better performance, set all your monitors to the same color format
- How do I get a handle to the primary monitor?
- Why does the primary monitor have
(0,0) as its upper left coordinate? - How do I get the color depth of the screen?
- How does the window manager adjust
ptMaxSize and ptMaxPosition for multiple monitors?
アクセシビリティ
- Accessibility is not just for people with disabilities
- How to retrieve text under the cursor (mouse pointer)
- How do I set an accessible name on an unlabeled control?
- How can I get notified when some other window is destroyed?
- Using accessibility to monitor windows as they come and go
- How can I write a program that monitors another window for a title change?
- How can I write a program that monitors another window for a change in size or position?
COM
Declaring COM Interfaces
- The macros for declaring COM interfaces, revisited: C version
- The macros for declaring COM interfaces, revisited: C++ version
- The macros for declaring COM interfaces, revisited: C++ implementation
- The oracle always tells the truth, even when it is wrong: COM method calls with a user-defined type as a return value (on problems of COM interfaces called from C code)
- The COM interface contract rules exist for a reason
- Giving a single object multiple COM identities, part 1
- Giving a single object multiple COM identities, part 2
- Giving a single object multiple COM identities, part 3
- Giving a single object multiple COM identities, part 4
- How do I consume raw COM interfaces from a Windows Runtime metadata file?
COM Apartments
- The dreaded "main" threading model
- A slightly less brief introduction to COM apartments (but it's still brief)
- Yo dawg, I hear you like COM apartments, so I put a COM apartment in your COM apartment so you can COM apartment while you COM apartment
- What kind of apartment is the private apartment I created via
CLSID_ContextSwitcher ? - Setting up private COM contexts to allow yourself to unload cleanly
- How do you get into a context via
IContextCallback::ContextCallback ? - Using contexts to return to a COM apartment later
- What do the output values from
CoGetApartmentType mean? - User interface code + multi-threaded apartment = death
- Other problems traced to violating COM single-threaded apartment rules in the shell
- What's the point of
APTTYPE_CURRENT ? I mean, of course I'm current. - How do I get a foothold in the neutral apartment?
- What is so special about the Application STA?
- What does it mean when a call fails with
0x8000001F = RO_E_BLOCKED_CROSS_ASTA_CALL ?
COM Initialization
- What does the
COINIT_SPEED_OVER_MEMORY flag to CoInitializeEx do? - Crashing in COM after I call
CoUninitialize , how can COM be running after it is uninitalized?
COM Static Store
- The COM static store, part 1: Introduction
- The COM static store, part 2: Race conditions in setting a singleton
- The COM static store, part 3: Avoiding creation of an expensive temporary when setting a singleton
- The COM static store, part 4: Aggregating into a single object
- The COM static store, part 5: Using COM weak references
- The COM static store, part 6: Using C++ weak references
COM Marshaling
- What is COM marshaling and how do I use it?
- On proper handling of buffers in COM and RPC methods
- What are the rules for
CoMarshalInterThreadInterfaceInStream and CoGetInterfaceAndReleaseStream ? - What are the rules for
CoMarshalInterface and CoUnmarshalInterface ? -
CoGetInterfaceAndReleaseStream does not mix with smart pointers - The COM marshaller uses the COM task allocator to allocate and free memory
- Why do I get a
QueryInterface(IID_IMarshal) and then nothing? - We batched up our COM requests and return a single stream of results, but the performance is still slow
- What are the various usage patterns for manually-marshaled interfaces?
- An initial look at the mechanics of how COM marshaling is performed
- https://devblogs.microsoft.com/oldnewthing/20220616-00/?p=106757
- Writing a marshal-by-value marshaler, part 1
- Writing a marshal-by-value marshaler, part 2
- Writing a compound marshaler
- Understanding the marshaling flags: The free-threaded marshaler
COM Error Handling
- What happens to my COM server-side object when clients die unexpectedly?
- Why does COM require output pointers to be initialized even on failure?
- How do I convert an
HRESULT to a Win32 error code? - How can I tell the WIL
RETURN_IF_FAILED macro that some errors are ignorable? - Do not overload the
E_NOINTERFACE error - What does it mean when a call fails with
0x8000001F = RO_E_BLOCKED_CROSS_ASTA_CALL ? - What does it mean when my cross-thread COM call fails with
RPC_E_SYS_CALL_FAILED ? - Understanding a mysterious
RPC_E_WRONGTHREAD exception when we're on the right thread
COM Asynchronous Interfaces
- COM asynchronous interfaces, part 1: The basic pattern
- COM asynchronous interfaces, part 2: Abandoning the operation
- COM asynchronous interfaces, part 3: Abandoning the operation after a timeout
- COM asynchronous interfaces, part 4: Doing work while waiting for the asynchronous operation
- COM asynchronous interfaces, part 5: The unreliable server
- COM asynchronous interfaces, part 6: Learning about completion without polling
- COM asynchronous interfaces, part 7: Being called directly when the operation completes
- COM asynchronous interfaces, part 8: Asynchronous release, the problems
- COM asynchronous interfaces, part 9: Asynchronous release, assembling a solution
GUIDs
- What's the difference between
UuidFromString , IIDFromString , CLSIDFromString , GUIDFromString ... - What is the difference between
UuidToString , StringFromCLSID , StringFromIID , and StringFromGUID2 ? - Why are there four functions for parsing strings into GUIDs, and why are they in three different DLLs?
- Why does COM express GUIDs in a mix of big-endian and little-endian? Why can't it just pick a side and stick with it?
COM Strings
- Why is there a
BSTR cache anyway? - Raymond's complete guide to
HSTRING semantics - What is the correct way of using the string buffer returned by the
WindowsPreallocateStringBuffer function?
COM Variants
- What's the difference between
VARIANT and VARIANTARG ? - Nasty gotcha:
VarCmp vs VariantCompare - Why can't
VarDateFromStr parse back a Hungarian date that was generated by VarBstrFromDate ?
IUnknown
- The layout of a COM object
- Under what conditions will the
IUnknown::AddRef method return 0? - The ways people mess up
IUnknown::QueryInterface - The ways people mess up
IUnknown::QueryInterface , episode 2 - The ways people mess up
IUnknown::QueryInterface , episode 3 - The ways people mess up
IUnknown::QueryInterface , episode 4 - COM object destructors are very sensitive functions
- Avoiding double-destruction when an object is released
- I'd like an
IUnknown , I know you have many, I'll take any of them - A very brief introduction to patterns for implementing a COM object that hands out references to itself
- Giving a single object multiple COM identities, part 1
- Giving a single object multiple COM identities, part 2
- Giving a single object multiple COM identities, part 3
- Giving a single object multiple COM identities, part 4
- Reducing chattiness by querying for multiple interfaces at once, part 1
- Reducing chattiness by querying for multiple interfaces at once, part 2
IMoniker
- Pidls and monikers do roughly the same thing, just backwards
ICallback
- A very brief introduction to patterns for implementing a COM object that hands out references to itself
IContextMenu
- Why an object cannot be its own enumerator
- How to host an
IContextMenu , part 1 - Initial foray - How to host an
IContextMenu , part 2 - Displaying the context menu - How to host an
IContextMenu , part 3 - Invocation location - How to host an
IContextMenu , part 4 - Key context - How to host an
IContextMenu , part 5 - Handling menu messages - How to host an
IContextMenu , part 6 - Displaying menu help - How to host an
IContextMenu , part 7 - Invoking the default verb - How to host an
IContextMenu , part 8 - Optimizing for the default command - How to host an
IContextMenu , part 9 - Adding custom commands - How to host an
IContextMenu , part 10 - Composite extensions - groundwork - How to host an
IContextMenu , part 11 - Composite extensions - composition - Simplifying context menu extensions with
IExecuteCommand - How do I launch a file as if it were a text file, even though its extension is not
.txt ? - Do not access the disk in your
IContextMenu handler, no really, don't do it - Sure, we do that: Context menu edition
- Psychic debugging: Why your
IContextMenu::InvokeCommand doesn't get called even though you returned success from IContextMenu::QueryContextMenu - Don't forget to implement canonical names for verbs in your shell context menu extension
IFileDialog
- The
SetClientGuid method of the common file and folder dialogs lets you give names to those dialogs, too (multiple contexts for open/save dialogs) - How can I get my
FileSavePicker to open in the same folder that was picked by the FileOpenPicker or FolderPicker ? (win32/COM equivalent mentioned at the end of the post) - Why does IFileDialog still show non-filesystem folders when I pass
FOS_FORCEFILESYSTEM ?
IMultiLanguage
- Converting between
LCID s and RFC 1766 language codes - Feel free to stop using
IMultiLanguage2::DetectInputCodepage
INamespaceWalk
- How can I control which parts of the shell namespace the
INamespaceWalk::Walk operation will walk into? - How can I cancel the
INamespaceWalk::Walk operation? - Cancelling the
INamespaceWalk::Walk operation a little faster
IStream
- The subtleties of
CreateStreamOnHGlobal , part 1: Introduction and basic usage - The subtleties of
CreateStreamOnHGlobal , part 2: Suppressing the deletion of an unknown HGLOBAL - The subtleties of
CreateStreamOnHGlobal , part 3: Suppressing the deletion of a shared HGLOBAL - The subtleties of
CreateStreamOnHGlobal , part 4: Non-movable memory - A practical use for
GetHGlobalFromStream when sharing was never your intention
IVirtualDesktopManager
- Virtual desktops are an end-user window management feature, not a programmatic one
Clipboard
- How ownership of the Windows clipboard is tracked in Win32
- What happens when applications try to copy text by sending
Ctrl+C - How do I make it so that users can copy static text on a dialog box to the clipboard easily?
- What is the proper handling of
WM_RENDERFORMAT and WM_RENDERALLFORMATS ? - Copying a file to the clipboard so you can paste it into Explorer or an email message or whatever
- Printing the contents of the clipboard as text to
stdout - Improving the performance of
CF_HDROP by providing file attribute information - What's up with the
CF_SYLK and CF_DIF clipboard formats? - How can I wait more than 30 seconds for a delay-rendered clipboard format to become rendered?
ドラッグアンドドロップ
- What a drag: Dragging text
- What a drag: Dragging a Uniform Resource Locator (URL)
- What a drag: Dragging a Uniform Resource Locator (URL) and text
- What a drag: Dragging a virtual file (
HGLOBAL edition) - What a drag: Dragging a virtual file (
IStream edition) - What a drag: Dragging a virtual file (
IStorage edition) - You can drag multiple virtual objects, you know
- Reading a contract from the other side: Simulating a drop
- Simulating a drop, part two
- What happens if I drag the mouse by exactly the amount specified by
SM_CXDRAG ? - How do I accept files to be opened via
IDropTarget instead of on the command line? - How do I accept files to be opened via
IDropTarget instead of on the command line? - bonus content - Using Explorer's fancy drag/drop effects in your own programs
- Drag/drop effects: The little drop information box
- Why isn't my shell namespace extension getting every single
DragOver mouse message? - Why doesn't my program get fancy drag/drop effects in high contrast mode with
CLSID_DragDropHelper ?
列挙
- Using fibers to simplify enumerators, part 1: When life is easier for the enumerator
- Using fibers to simplify enumerators, part 2: When life is easier for the caller
- Using fibers to simplify enumerators, part 3: Having it both ways
- Using fibers to simplify enumerators, part 4: Filtering
- Using fibers to simplify enumerators, part 5: Composition
シェル
- When does
SHLoadInProc unload a DLL? - What does
SHGFI_USEFILEATTRIBUTES mean? - What's the difference between
SHGetMalloc , SHAlloc , CoGetMalloc , and CoTaskMemAlloc - Querying information from an Explorer window
- Execute a file as if it were a program, even though its extension is not
EXE - How do I launch a file as if it were a text file, even though its extension is not
.txt ? - What does the
SEE_MASK_UNICODE flag in ShellExecuteEx actually do? - Simple things you can do with the
ShellExecuteEx function - What were
ShellExecute hooks designed for? - Why does
ShellExecute return SE_ERR_ACCESSDENIED for nearly everything? - How do I
ShellExecute a file, but with a specific program instead of the default program? - What is the difference between
CSIDL_DESKTOP and CSIDL_DESKTOPDIRECTORY ? -
SHCIDS_CANONICALONLY is the moral equivalent in the shell namespace of the Unicode ordinal comparison - Don't forget to double-null-terminate those strings you pass to
SHFileOperation - Why does
SHFileOperation have internal error codes for DVD? - Why do non-folders in my shell namespace extension show up in the folder tree view?
-
SHAutoComplete giveth, and SHAutoComplete taketh away - What is the
lpClass member of SHELLEXECUTEINFO used for? - Some known folders cannot be moved, but others can, and you'll just have to accept that
- One possible reason why
ShellExecute returns SE_ERR_ACCESSDENIED and ShellExecuteEx returns ERROR_ACCESS_DENIED - Why does
SHGetSpecialFolderPath take such a long time before returning a network error? - How do you obtain the icon for a shortcut without the shortcut overlay? (
SHGetFileInfo() ) - How can I get information about the items in the Recycle Bin?
- Modernizing our simple program that retrieves information about the items in the Recycle Bin
- Invoking commands on items in the Recycle Bin
- How do I perform shell file operations while avoiding shell copy hooks?
- Command line tool to manage Windows 7 Libraries, with source code (
IShellLibrary ) -
IShellFolder::BindToObject is a high-traffic method; don't do any heavy lifting - Obtaining the parsing name (and pidl) for a random shell object
- Creating a simple pidl: For the times you care enough to send the very fake
- Creating a simple shell item, just as fake as a simple pidl
- Displaying a property sheet for multiple files
- How do I get a high resolution icon for a file?
- How do I extract an icon at a nonstandard size if
IExtractIcon::Extract tells me to go jump in a lake? - How do I read the "Double-click to open an item (single-click to select)" setting in Folder Options?
- The wonderful world of shell bind context strings
- Helper functions to make shell bind contexts slightly more manageable
- Customizing item enumeration with
IShellItem - Customizing item enumeration with
IShellItem , the old-fashioned way - How do I create an
IShellItemArray from a bunch of file paths? - How do I invoke a verb on an
IShellItemArray ? - How does a shell namespace extension provide icons for virtual items that track the standard icons set by the user's file associations?
- How do I get the user-customed name of My Computer or Recycle Bin?
- How do I get the user-customized name of a mapped network drive?
- Enumerating all the programs that can open a particular file extension
- Enumerating all the programs that can launch a particular protocol
- How do I register a command on the desktop background context menu? (And how do I remove one I don't like?)
- How can I get the canonical name for a known folder?
- Peeking inside an
IShellItem to see what it's made of - Why does
SHGetKnownFolderPath return E_FAIL for a known folder? - Why does
SHGetKnownFolderPath fail when impersonating? - Why can't I use
SHSetKnownFolderPath to change the location of FOLDERID_LocalAppData ? - How do I programmatically add a folder to my Documents library?
- Why doesn't
SHGetFileInfo give me customized folder icons? - How can I detect that a shell item refers to a virtual folder, or to a file system inside a file?
- Why is there a limit of 15 shell icon overlays?
- The case of the
SHGetFolderPath(CSIDL_COMMON_DOCUMENTS) that returned ERROR_PATH_NOT_FOUND - Why is the
HSHELL_WINDOWDESTROYED notification raised when a window is hidden, even if it hasn't been destroyed? - Why am I receiving
HCNE_UPDATEDIR notifications that my code never generates? - Why am I receiving
SHCNE_UPDATEDIR notifications that my code never generates? - How can I get the original target of a shortcut without applying any 32-bit adjustments?
- How does Explorer calculate the “Date” of a file?
Uncategorized COM Stuff
- The macros for declaring and implementing COM interfaces
- An introduction to COM connection points
- Dispatch interfaces as connection point interfaces
- Adjustor thunks
- What is the underlying object behind a COM interface pointer?
- How to turn off the exception handler that COM "helpfully" wraps around your server
- Shortcuts are serializable objects, which means that they can be stored in places other than just a file
- Why does
IFileOperation skip junctions even though I passed FOFX_NOSKIPJUNCTIONS ? - Nasty gotcha:
STGM_READ | STGM_WRITE does not grant read/write access - How can I get the list of programs the same way that Programs and Features gets it?
- How do I obtain the computer manufacturer's name via C++? (
IWbemClassObject ) - The stream pointer position in
IDataObject::GetData and IDataObject::GetDataHere is significant - The sad implementation history of COM component categories and why it means you have to click twice to see your newly-installed taskbar toolbar
- How do I request that my out-of-process COM server run unelevated?
- How can a desktop app use a Windows Runtime object that infers UI context from its thread? The
IInitializeWithWindow pattern ( IInitializeWithWindow ) - How do I protect myself against a COM call that can hang? I'm already running the server out-of-process.
- What can I do about timer build-up when waiting for COM outbound calls to complete?
- Manipulating the positions of desktop icons
- A reminder about the correct way of accessing and manipulating the position of icons on the desktop
- The oracle always tells the truth, even when it is wrong: COM method calls with a user-defined type as a return value (on problems of COM interfaces called from C code)
- Notes on COM aggregation: Obtaining a pointer to your aggregated partner without introducing a reference cycle
- Notes on COM aggregation: How do you implement tear-offs in an aggregated object?
- The theory behind the
IHttpFilter interface
メモリ
- Stupid memory-mapping tricks
- Creating a shared memory block that can grow in size
- Why do I have to pass a valid page protection value to
VirtualAlloc even if it ignores it? - How can I include/exclude specific memory blocks in user-mode crash dumps?
-
IsBadXxxPtr should really be called CrashProgramRandomly ( IsBadWritePtr() et al.) - A closer look at the stack guard page
- The case of the stack overflow exception when the stack is nowhere near overflowing
- How to allocate address space with a custom alignment or in a custom address region
入出力
- Mount points, volumes, and physical drives, oh my!
- What's the difference between an asynchronous
PIPE_WAIT pipe and a PIPE_NOWAIT pipe? - Be careful when redirecting both a process's
stdin and stdout to pipes, for you can easily deadlock - Looking at the problem at the wrong level: Closing a process's
stdin -
ReadDirectoryChangesW reads directory changes, but what if the directory doesn't change? - How do
FILE_FLAG_SEQUENTIAL_SCAN and FILE_FLAG_RANDOM_ACCESS affect how the operating system treats my file? - I used
FILE_FLAG_SEQUENTIAL_SCAN but it didn't seem to speed up my sequential scanning - You can use an
OVERLAPPED structure with synchronous I/O, too - We're currently using
FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH , but we would like our WriteFile to go even faster - On using
ILE_FLAG_WRITE_THROUGH and FILE_FLAG_NO_BUFFERING for memory-mapped files - On the interaction between the
FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH flags - Why does my synchronous overlapped
ReadFile return FALSE when the end of the file is reached? - Why does
SetFileValidData fail even though I enabled the SE_MANAGE_VOLUME_NAME privilege? - Is
GENERIC_ALL equivalent to GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE ? -
CancelIoEx can cancel I/O on console input, which is kind of nice -
CancelIoEx can cancel synchronous I/O, which is kind of nice - Why does
IsPathRelative return FALSE for paths that are drive-relative? - The security check happens at the acquisition of the handle
- Taking a shortcut: You can query properties from a volume, and it will forward to the physical drive
- https://devblogs.microsoft.com/oldnewthing/20201023-00/?p=104395
- How do I disassociate a thread from an I/O completion port?
- Is it okay to call
MapViewOfFile on the same mapping handle simultaneously from different threads? - What are these dire multithreading consequences that the
GetFullPathName documentation is trying to warn me about? - How can I force a
WriteFile or ReadFile to complete synchronously or hang, in order to test something? - How can I perform a
CopyFile , but also flush the file buffers before the destination handle is closed?
Asynchronous Input and Output
- Developing the method for taking advantage of the fact that the
OVERLAPPED associated with asynchronous I/O is passed by address - Ready... cancel... wait for it! (part 1)
- Ready... cancel... wait for it! (part 2)
- Ready... cancel... wait for it! (part 3)
- If you're waiting for I/O to complete, it helps if you actually have an I/O to begin with
- Why does my asynchronous I/O complete synchronously?
- If an asynchronous I/O completes synchronously, is the
hEvent in the OVERLAPPED structure signaled anyway? - You can use an
OVERLAPPED structure with synchronous I/O, too - Why does my synchronous overlapped
ReadFile return FALSE when the end of the file is reached? - If I issue a second overlapped I/O operation without waiting for the first one to complete, are they still guaranteed to complete in order?
- Why are my file write operations synchronous, even though I opened the file as
FILE_FLAG_OVERLAPPED ? - File-extending writes are not always synchronous, which is entirely within the contract
- Why you might need additional control over the secret event hiding inside the file object
- Why doesn't my asynchronous read operation complete when I close the handle?
- The mental model for
StartThreadpoolIo - How can I force a
WriteFile or ReadFile to complete synchronously or hang, in order to test something? - If I issue multiple overlapped I/O requests against the same region of a file, will they execute in the order I issued them?
- What are the potentially-erroneous results if you don't pass
NULL as the lpNumberOfBytesRead when issuing overlapped I/O?
Files and Directories
- The Definitive Guide on Win32 to NT Path Conversion
- How can I tell that a directory is really a recycle bin?
- How can I tell that a directory is weird and should be excluded from the user interface?
- How do I get information about the target of a symbolic link?
- How do I access a file without updating its last-access time?
- How do I show the contents of a directory while respecting the user's preferences for hidden and super-hidden files as well as the user's language preferences?
- You can use a file as a synchronization object, too
- How can I append to a file and know where it got written, even if the file is being updated by multiple processes?
- The
FILE_FLAG_DELETE_ON_CLOSE flag applies to the handle, also known as the file object, which is not the same as the file - How long do I have to keep the
SECURITY_ATTRIBUTES and SECURITY_DESCRIPTOR structures valid after using them to create a file? - How do I create a directory where people can create subdirectories but cannot mess with those created by other users?
- How can I tell whether a file is on a removable drive, a fixed drive, or a remote drive?
- How can I tell whether a file is on an SSD?
- Why does a non-recursive
ReadDirectoryChangesW still report files created inside subdirectories? - The early history of Windows file attributes, and why there is a gap between System and Directory
- Even if you open a file with GUID, you can still get its name, or at least one of its names (
GetFinalPathNameByHandle() ) - How do I get from a file path to the volume that holds it?
- How do I get from a volume to the physical disk that holds it?
- Renaming a file is a multi-step process, only one of which is changing the name of the file
- How can I recognize file systems that don't support 64-bit unique file identifiers?
- How can I recognize whether two handles refer to the same underlying file?
ACL
- The
MoveSecurityAttributes policy affects only how Explorer recalculates ACLs when a file is moved; everybody else is on their own - How to create a folder that inherits its parent's ACL, and then overrides part of it
Security Permissions, Attributes and Identifiers
- The security check happens at the acquisition of the handle
- What is the default security descriptor?
- How do I convert a SID between binary and string forms?
- What are these SIDs of the form
S-1-15-2-xxx ? - What are these SIDs of the form
S-1-15-3-xxx ? - An easy way to determine whether you have a particular file permission
- What are the access rights and privileges that control changing ownership of an object?
- How do the names in the file security dialog map to access control masks?
- If you ask for
STANDARD_RIGHTS_REQUIRED , you may as well ask for the moon - A user's SID can change, so make sure to check the SID history
- Detecting whether a SID is well-known SID
- SIDs are really just another a fancy way of creating unique IDs in a decentralized way
- What's the point of giving my unnamed object proper security attributes since unnamed objects aren't accessible outside the process anyway (or are they?)
- Is a SID with zero subauthorities a valid SID? It depends whom you ask
- What's the difference between duplicating the handle to a token and duplicating a token?
- I called
AdjustTokenPrivileges , but I was still told that a necessary privilege was not held - I called
AdjustTokenPrivileges , but I was still told that a necessary privilege was not held, redux - The history of the
EncodePointer function for obfuscating pointers - Additional helpful pseudo-handles: The process token, the thread token, and the effective token
- How can I tell whether my process is running as SYSTEM?
- A brief summary of the various versions of the Security Descriptor Definition Language (SDDL)
- How do I free the pointers returned by functions like
GetTokenInformation ? - A clarification on the multithreading constraints of the
EncryptMessage function
レジストリ
- Beware of non-null-terminated registry strings
- The performance cost of reading a registry key
- So how bad is it that I'm calling
RegOpenKey instead of RegOpenKeyEx ? - If I simply want to create a registry key but don't intend to do anything else with it, what security access mask should I ask for?
- How can I programmatically inspect and manipulate a registry hive file without mounting it?
- Why doesn't
RegSetKeySecurity propagate inheritable ACEs, but SetSecurityInfo does? - Why does
RegNotifyChangeKeyValue stop notifying once the key is deleted? - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC flag on systems that don't support it? part 1 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC flag on systems that don't support it? part 2 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC flag on systems that don't support it? part 3 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC flag on systems that don't support it? part 4 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC flag on systems that don't support it? part 5 - The history of passing a null pointer as the key name to
RegOpenKeyEx - On the failed unrealized promise of
RegOverridePredefKey (ie don't use it.)
Strings and Locales
-
TEXT vs. _TEXT vs. _T , and UNICODE vs. _UNICODE - The sad history of Unicode
printf -style format specifiers in Visual C++ - Nasty gotcha:
SetThreadUILanguage cannot be used to restore the thread UI language - How can
CharUpper and CharLower guarantee that the uppercase version of a string is the same length as the lowercase version? (use LCMapStringEx() in any new code) - Is there a code page that matches ASCII and can round trip arbitrary bytes through Unicode?
- A consequence of being the first to adopt a standard is that you may end up being the only one to adopt it: The sad story of Korean jamo
- The
activeCodePage manifest element can be used for more than just setting UTF-8 as the active code page - Feel free to stop using
IMultiLanguage2::DetectInputCodepage - On the proper care and feeding of the enigmatic
GetDistanceOfClosestLanguageInList function - How can I get
WideCharToMultiByte to convert strings encoded in UTF-16BE?
NT Services
- Calling
ShutdownBlockReasonCreate from my service doesn't stop the user from shutting down - What does it mean when my attempt to stop a Windows NT service fails with
ERROR_BROKEN_PIPE ? - How can I configure my Windows NT service to autostart when the system gains Internet access?
- On the confusing names for the Windows service SID types
未分類
- How do I determine the processor's cache line size? (
GetLogicalProcessorInformation() ) - Why are structure sizes checked strictly?
- What's the difference between
CreateMenu and CreatePopupMenu ? - Why are
HANDLE return values so inconsistent? - How to retrieve text under the cursor (mouse pointer)
- How to detect programmatically whether you are running on 64-bit Windows
- A timed context menu
- The importance of passing the
WT_EXECUTELONGFUNCTION flag to QueueUserWorkItem - If your callback fails, it's your responsibility to set the error code
- The double-click time tells the window manager how good your reflexes are
- The cursor isn't associated with a window or a window class; it's associated with a thread group
- Menu item states are not reliable until they are shown because they aren't needed until then
- How can I display a live screenshot of a piece of another application?
- Converting from a UTC-based
SYSTEMTIME directly to a local-time-based SYSTEMTIME - Programmatically uploading a file to an FTP site
- How can you use both versions 5 and 6 of the common controls within the same module?
- How can I tell if Windows Update is waiting for the system to reboot?
- How do I call
SetTimer with a timer ID that is guaranteed not to conflict with any other timer ID? - A window can't have two timers with the same ID, so how do I assign an ID that nobody else is using?
- What does it mean when a display change is temporary?
- How do I obtain the comment for a share?
- How accurate are the various Windows time-querying functions?
- How can I detect whether the user is logging off?
- Why are timer IDs and dialog control IDs 64-bit values on 64-bit Windows? Did you really expect people to create more than 4 billion timers or dialog controls?
- If you suppress GDI+ background thread, then you are expected to pump messages yourself
- If one program blocks shutdown, then all programs block shutdown (
WM_QUERYENDSESSION , WM_ENDSESSION ) - When I ask the
GetIpAddrTable function to sort the results, how are they sorted? - How can I detect that the system is no longer showing a UAC prompt? (
EVENT_SYSTEM_DESKTOPSWITCH ) - How can I get the number of processors in the system, when there are more than 64?
- Why are some system functions exported as stubs instead as forwarders?
- How can I check whether the user has disconnected from the session?
- Why does
PF_VIRT_FIRMWARE_ENABLED return false even when virtualization is enabled in the firmware? - How can I convert between IANA time zones and Windows registry-based time zones?
- The focus rectangle says, “I'm not orange. I'm just drawn that way.”
- Why does the precise point at which I get a stack overflow exception change from run to run? (structured exception handling aka SEH)
- How do I programmatically reposition monitors in a multiple-monitor system? (
ChangeDisplaySettingsEx() ) - How do I upgrade a 32-bit tick count to a 64-bit one?
- The error code you get might not be the one you want
- How can I find out which processor architectures are supported via emulation by the current system?
- How can I detect whether the system has a keyboard attached? On the
GetRawInputDeviceList function - Filtering out fake keyboards from the
GetRawInputDeviceList function - How expensive is
PssCaptureSnapshot ? How fast is it? How much memory does it consume? - What is the
CreateExplorerShellUnelevatedTask scheduled task? - Under what conditions can I modify the memory that I received in the form a
STGMEDIUM ? - Is it true that raising a structured exception from a structured exception handler terminates the process?
- Why are many Windows user interface elements positioned at multiples of 4 or 8 pixels? (DPI,
DEVICE_SCALE_FACTOR ) - A history of the
fd_set , FD_SETSIZE , and how it relates to WinSock - How can I detect programmatically whether Windows is an N or KN version?
- How should I interpret the various values of
NLM_CONNECTIVITY ? - How can I find out the last time a user logged on from C++?
- How can I specify icons for my app to use on the Start menu in high contrast mode?
- How can I add an environment variable to a process launched via
ShellExecuteEx or IContextMenu ? - Functions that return the size of a required buffer generally return upper bounds, not tight bounds