<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>dharry</author_name>
  <author_url>https://blog.hatena.ne.jp/dharry/</author_url>
  <blog_title>harry’s memorandum</blog_title>
  <blog_url>https://dharry.hatenablog.com/</blog_url>
  <categories>
    <anon>windows</anon>
  </categories>
  <description>仕事で少し必要になったので得意じゃないVCを。OpenProcess()でプロセスのハンドラを取得してSetPriorityClass()で優先度を変更するだけと思っていたのですが、一部のプロセスはアクセス拒否で弾かれてしまいました。サービスプロセスやSYSTEMユーザで起動しているプロセスは変更できないのですね。でもSysinternal社のProcess Explorer*1だとお構いなしに優先度を変更できるので少し調べたところ、こんな感じでいけるのではなかろうかと。(あってるのか？) AdjustTokenPrivileges()で特権をつけて OpenProcess()でハンドラを取得…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdharry.hatenablog.com%2Fentry%2F20090526%2F1243345653&quot; title=&quot; プロセスの優先度を強制的に変更 - harry’s memorandum&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-05-26 22:47:33</published>
  <title> プロセスの優先度を強制的に変更</title>
  <type>rich</type>
  <url>https://dharry.hatenablog.com/entry/20090526/1243345653</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
