サイト内検索:
実行ファイルの絶対パスを文字列strModulePathに格納するサンプルです。
Dim strModulePath As String strModulePath = App.Path If Right(strModulePath, 1) <> "\" Then strModulePath = strModulePath + "\" End If strModulePath = strModulePath + App.EXEName + ".exe"
// windows.hをインクルードする必要があります。 // #include <windows.h> char strModulePath[_MAX_PATH]; GetModuleFileName(NULL, strModulePath, _MAX_PATH);