0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Python(64bit)でJV-Link(32bit)を使いたい

Last updated at Posted at 2025-04-22

JRA-VAN Data Lab.のデータを機械学習して自前のAI予想がしたい!

データをダウンロードする為にはJV-LinkというActiveXコントロールを使用するが、それが32bitでネイティブ64bitからは使えないと言われている。

でも、今更 Python 32bitは入れたくない。
色々と調べた結果「DllSurrogate」という仕組みで使えました。

DllSurrogate

レジストリへキーを追加すると dllhost.exe が32bitのDLLを読み込んでアウトプロセスCOMサーバーの役割を担ってくれるというものです。

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{2AB1774D-0C41-11D7-916F-0003479BEB3F}]
"AppID"="{2AB1774D-0C41-11D7-916F-0003479BEB3F}"

[HKEY_CLASSES_ROOT\Wow6432Node\AppID\{2AB1774D-0C41-11D7-916F-0003479BEB3F}]
"DllSurrogate"=""

JV-LinkのProgIDを使って、上記内容の拡張子.regファイルを作り、ダブルクリック。
レジストリへキーが追加されるとPython(64bit)で使えるようになりました。

以下で、もう少し詳細に書いてますので、よろしければご覧ください。

【Python】64bitアプリでJV-Linkを使う

おそらく、Pythonに限らず 32bit COMサーバーを64bitアプリケーションから使いたい場合に使える方法だと思います。

何かの参考になれば幸いです。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?