<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>potisan</author_name>
  <author_url>https://blog.hatena.ne.jp/potisan/</author_url>
  <blog_title>potisanのプログラミングメモ</blog_title>
  <blog_url>https://potisan-programming-memo.hatenablog.jp/</blog_url>
  <categories>
    <anon>comtypes</anon>
    <anon>Python 3</anon>
  </categories>
  <description>comtypesパッケージの使用時に気付いたことのメモです。comtypesのバージョンにより挙動は変わる可能性があります。 IUnknown派生クラスは解放時にReleaseCOMメソッドが呼び出される。 参照カウンタを気にして自分で解放するとランダムでスレッド外アクセスエラーが発生します。C/C++の参照カウンタ自己管理に慣れているとハマる点です。 IUnknown自体は__del__関数を定義しませんが、メタクラスに_cominterface_metaクラスを持ちます。メタクラスによる__new__関数でIUnknownクラスや派生クラスの派生クラスは_compointer_baseに置…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2024%2F08%2F03%2F170934&quot; title=&quot;Python&amp;amp;Windows comtypesパッケージのメモ - potisanのプログラミングメモ&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>2024-08-03 17:09:34</published>
  <title>Python&amp;Windows comtypesパッケージのメモ</title>
  <type>rich</type>
  <url>https://potisan-programming-memo.hatenablog.jp/entry/2024/08/03/170934</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
