1 / 13

SAORI の紹介~ call_func.dll

SAORI の紹介~ call_func.dll. しら たま. もくじ. そもそも SAORI って? 簡単な SAORI の仕組み c all_func.dll の機能 各機能紹介 DLL 関数呼び出し メモリ操作 構造体 応用 まとめ. そもそも SAORI って ?. SHIORI の機能拡張プラグイン SHIORI によらず共通の処理を外に出して 、 どの SHIORI からでも使えるようにしよう 壁紙の変更・ゴミ箱の掃除  etc. 詳しくは WEB で! http://www.boreas.dti.ne.jp/~ sdn/saori.html.

yan
Télécharger la présentation

SAORI の紹介~ call_func.dll

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SAORIの紹介~call_func.dll しらたま 伺的ソフトウェア勉強会 大阪 #7

  2. もくじ • そもそもSAORIって? • 簡単なSAORIの仕組み • call_func.dllの機能 • 各機能紹介 • DLL関数呼び出し • メモリ操作 • 構造体 • 応用 • まとめ 伺的ソフトウェア勉強会 大阪 #7

  3. そもそもSAORIって? • SHIORIの機能拡張プラグイン • SHIORIによらず共通の処理を外に出して、どのSHIORIからでも使えるようにしよう • 壁紙の変更・ゴミ箱の掃除 etc. • 詳しくはWEBで! • http://www.boreas.dti.ne.jp/~sdn/saori.html 伺的ソフトウェア勉強会 大阪 #7

  4. 簡単なSAORIの仕組み EXECUTE SAORI/1.0 Argument0: Value Argument1: Value Argument2: Value いくつかの値を与えられる SHIORI SAORI SAORI/1.0 200 OK Result: Scalar-Value Value0: Vector-Value Value1: Vector-Value 1つの値と 追加で複数の値を 受け取れる 伺的ソフトウェア勉強会 大阪 #7

  5. call_func.dllの機能 メイン • DLL関数呼び出し • 任意のDLLの関数を呼び出し使用可能 サブ • メモリ操作 • 構造体の作成 • DLL関数呼び出しに使えるデータ構造を提供 伺的ソフトウェア勉強会 大阪 #7

  6. 各機能紹介 ― DLL関数呼び出し • 出来ること • DLL関数を呼び出してめんどうな処理を丸投げ • OSの機能(Win32API)の利用 • 出来ないこと • コールバック関数が必要な関数呼び出し • ウインドウプロシージャが必要な処理 • 出来るけど面倒なこと • 単純なヌル終端文字列以外が必要な関数の扱い 伺的ソフトウェア勉強会 大阪 #7

  7. DLL関数呼び出し ― 例 • ダイアログ表示 _cf = 'call_func.dll' _ = SAORI(cf,'add_func','user32.dll', 'MessageBoxA','i32','i32','cstr','cstr','i32') _ = SAORI(cf,'call_func', 'MessageBoxA',0,'msg','title',0) _ = SAORI(cf,'remove_func','MessageBoxA') 伺的ソフトウェア勉強会 大阪 #7

  8. 各機能紹介 ―メモリ操作 • 出来ること • メモリ上に領域を確保 • 領域の読み書き • 出来ないこと • 取得したメモリ領域サイズの変更 • SHIORIの変数自体のアドレス取得/操作 伺的ソフトウェア勉強会 大阪 #7

  9. メモリ操作 ― 例 • ファイル書き込み _h = SAORI(cf,'call_func', 'CreateFileA','aaa.txt',0x40000000,0,0,2,0,0) _p = SAORI(cf,'alloc_mem','str','abc') _p_len = SAORI(cf,'alloc_mem','u32') _ = SAORI(cf,'call_func', 'WriteFile',_h,_p,3,_p_len,0) _len = SAORI(cf,'get_mem',_p_len,'u32') _ = SAORI(cf,'call_func','CloseHandle',_h) _ = SAORI (cf,'free_mem',_p,'str') _ = SAORI (cf,'free_mem',_p_len,'u32') 伺的ソフトウェア勉強会 大阪 #7

  10. 各機能紹介 ―構造体作成 • 出来ること • データ型の並びに合わせてメモリ領域確保 • データ型の並びに合わせて領域の読み書き • 出来ないこと • 構造体の中に構造体をつくる • 共用体のある構造体の表現 伺的ソフトウェア勉強会 大阪 #7

  11. 構造体作成 ― 例 _ = SAORI(cf,'add_struct','header','u32','u32','u32','u32', 'u32','u16','u16','u32','u32','u16','u16','u32','u32') _a = SAORI(cf,'alloc_struct','header') _ = SAORI(cf,'set_struct_val_all',_a, 0x46464952,88236,0x45564157,0x20746D66,16,1,1, 44100,88200,2,16,0x61746164,88200) _c = SAORI(cf,'get_struct_addr',_a) _p_len = SAORI(cf,'alloc_mem','u32') _a = SAORI(cf,'call_func','WriteFile',_h,_c,44,_p_len,0) _len = SAORI(cf,'get_mem',_p_len,'u32') _ = SAORI(cf,'free_struct',_a) 伺的ソフトウェア勉強会 大阪 #7

  12. 応用 • COM呼び出し • ショートカットの作成など • 圧縮ファイルの解凍 • 統合アーカイバDLL • いろいろ組み合わせてインストーラ • DL+解凍+ファイル移動+ショートカット作成 伺的ソフトウェア勉強会 大阪 #7

  13. まとめ • SAORIは便利! • call_func使えばOSの機能使い放題! • SAORIを使って/作って おもしろいこと探してみよう! 伺的ソフトウェア勉強会 大阪 #7

More Related