;-------------------------------------- ; ; 作:せつき ; HP:http://www.setsuki.com/ ; ;-------------------------------------- #include "llmod.as" #module #deffunc get_related str ;************************************** ; 関連付けられたファイルを取得 ;************************************** mref file,32 mref ref,65 mref stt,64 getpath s1,file,8 //ファイル名文字列取得 getpath s2,file,32 //既定ディレクトリ取得 getptr prm.0, s1 // ファイル名文字列へのポインタ getptr prm.1, s2 // 既定ディレクトリ文字列へのポインタ getptr prm.2, s3 // 返される実行可能ファイル文字列を保持するバッファへのポインタ dllproc "FindExecutableA",prm,3,D_SHELL stt = dllret@ getstr ref,s3,0 if ref="" { if stt=0 : ref="システムは、メモリまたはリソースを使い果たしました。" : return if stt=31: ref="指定されたファイルタイプに対応する関連付けが存在しません。" : return if stt=2 : ref="指定されたファイル、またはパスが見つかりませんでした。" : return ref="ファイルが無効です(Win32 の .EXE ではないか、.EXE イメージ内にエラーが存在します)。" } return ;************************************** #global dialog "",16 : if stat=1 { get_related refstr dialog ""+refstr,0,""+stat }