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?

エロゲー用HookerをRustLangで作ってみる - 1

0
Last updated at Posted at 2026-05-01

Smart pointer at static array

byte arrayのサイズが決まっていないのでBox<>で包みVec<>でlog用dataを作りました。
: Vec>

        let pe_file;
        let v_bytes_data= match get_bytes_data(pe_file){
            Some(_bytes) =>{
                return _bytes;
            },
            None => { 
                panic!("None value") 
            }
        };

driven type dev

structとEnumを活用しました。

        let japanese_data= &v_bytes_data.iter().map(|data| 
                match data.source{
                    String::from("japanese") => data
                }
            );
        let cstring_data= string_from_bytes::CString::from_bytes(japanese_data);
        std::thread::spawn({
            let _ctring_data= cstring_data.clone();
            // @TODO convert struct type for fn logging_history paramater

            let struct_translated_strings= self::translation::TranslatedStrings::new();
            
            self::translation::TranslatedStrings::logging_history(
                &struct_translated_strings,
                &translated_data);
        });

git commut logs

commit 7dfd2a4507e0c73248cc45db4861af2bf3cb674a
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Fri May 1 12:47:23 2026 +0900

Add) let japanese_data

commit 980db00106810b4dce4e8039d28d528828b99931
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Fri May 1 12:36:06 2026 +0900

Modify) fn get_bytes_data<'a>(Pefile<'a>)

commit a751a2d7f78b7ee1ecdfc877e44e433dabaf0b5b
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Fri May 1 11:15:57 2026 +0900

Fix) Vec<Box<[u8]>>

commit be67610626853e6ca601f72aee42bb09ff341fa2
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Fri May 1 11:13:03 2026 +0900

add) struct BytesData

commit 62befd9561e907faf865346666f7facdecca00cf
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Fri May 1 10:28:02 2026 +0900

Add) fn logging_history(&mut self, translated_cstring: Translation) -> &mut self

commit 0ec48ad3c71c059581b58bcd2296884aaa7823bf
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Fri May 1 09:38:21 2026 +0900

Add) communicate_with_translation_api()

commit 7fc8e0645c00e484c4929bb236b9bd868492907b
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Thu Apr 30 11:08:35 2026 +0900

Type Change) unsafe C String

commit 475de4da65b4bb733ea94fa26868a3a017d3dd23
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Thu Apr 30 10:54:51 2026 +0900

Add) CStrings

commit bbd7df144d9f0db897c5bf6e1289535debca2a36
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Thu Apr 30 06:18:07 2026 +0900

Add) fn save_translated_data

commit d22b6c8bba08c0b9717b9a084085944086bed5c1
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Thu Apr 30 05:55:05 2026 +0900

Add) fn new() in impl StringData

commit 1f5e3b43bac94dca4688fcd7679a570d2b3a0281
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Thu Apr 30 05:38:58 2026 +0900

Modify) extract a struct StringData to commen

commit 8af9fe3fb9ccbd6bd64143b90c618302a941fa92
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Thu Apr 30 05:29:05 2026 +0900

Add) struct StringDate

commit 412e5e09fe651db43a96a5610e8cde33fedcfc3f
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Wed Apr 29 17:42:53 2026 +0900

Refector) on vs code

commit 6b914872b3e40df04af8744f7896ec080725aaf6
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Wed Apr 29 17:06:41 2026 +0900

Add) create pelite

commit 2b919c24057bfc6f3b74c669a0ef98b9881193a0
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Wed Apr 29 16:28:44 2026 +0900

Add) Module resources -> enums Name

commit 826e296fda4d63cbd4232dcae90eea6470f40bee
Author: dongsub-joung ehdtjqwjd@kangwon.ac.kr
Date: Wed Apr 29 15:38:38 2026 +0900

Add) HookPoint Err handle
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?