Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active December 27, 2024 04:01
Show Gist options
  • Save kjunichi/4d73200f8a292e46017179bccdc69992 to your computer and use it in GitHub Desktop.
Save kjunichi/4d73200f8a292e46017179bccdc69992 to your computer and use it in GitHub Desktop.
JuliaでWindowsでWin32APIを呼び出す

JuliaでWindowsでWin32APIを呼び出すをC++コードから実行

jl_eval_string("@ccall \"user32\".MessageBoxA(0::Int32, \"Hello, world!\"::Cstring,\"Hoge\"::Cstring,0x0040::Int32)::Int32");

日本語はCP932のままでも以下でOK

@ccall "user32".MessageBoxW(0::Int32, "こんにちは"::Cwstring,"Hoge日本語"::Cwstring,0x0040::Int32)::Int32

関連

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment