タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

win32apiとprogrammingに関するyzxのブックマーク (2)

  • Game Timing and Multicore Processors - Win32 apps

    With power management technologies becoming more commonplace in today's computers, a commonly-used method to obtain high-resolution CPU timings, the RDTSC instruction, may no longer work as expected. This article suggests a more accurate, reliable solution to obtain high-resolution CPU timings by using the Windows APIs QueryPerformanceCounter and QueryPerformanceFrequency. Background Recommendatio

    Game Timing and Multicore Processors - Win32 apps
    yzx
    yzx 2012/03/18
    QueryPerformanceCounter and QueryPerformanceFrequency
  • CreateProcessによるプログラム起動と制御

    CreateProcess()を使うと任意のプログラムをコマンドラインで、あるいは引数付で実行することができます。さらに、実行開始時の状態を指定したり実行したプロセスやプロセスのメインスレッドのハンドルも得られるので、プログラムの終了を待つなど柔軟な制御ができそうですね。 適当なエディタ機能とCreateProcess()を組み合わせれば、「編集したソースをコマンドラインでコンパイラに渡してコンパイル、コンパイル終了を待って実行」という簡単な「統合開発環境」を開発することもできるでしょう。 今回は、そうした他のプログラムとの連携を意識しCreateProcess()で任意のコマンドラインを指定してプログラムを実行し、そのプログラムの終了を検知してみることにします。 CreateProcessによる制御 まず、CreateProcess()でプログラムを起動してみましょう。CreatePro

  • 1