hasherezade / libpeconv

A library to load, manipulate, dump PE files. See also: https://github.com/hasherezade/libpeconv_tpl
https://hasherezade.github.io/libpeconv
BSD 2-Clause "Simplified" License
1.07k stars 176 forks source link

How to compatible with Unicode character set project? #4

Closed AppleSky6 closed 5 years ago

AppleSky6 commented 5 years ago

C2440 'default argument': cannot convert from 'LPWSTR' to 'const LPSTR'

peconv::ALIGNED_BUF load_resource_data(OUT size_t &out_size, const int res_id, const LPCSTR res_type = RT_RCDATA, HMODULE hInstance = nullptr);

I quoted the Lib file in the Unicode project and I would report it wrong. How should I be compatible with him

hasherezade commented 5 years ago

Hi! My first guess is that your problem occurred due to the fact, that I mistakenly used MAKEINTRESOURCE (implicit) rather than the explicit version: MAKEINTRESOURCEA, which will not define types basing on external settings. This thing is fixed now, so please update to the latest commit, and let me know if it helped.

AppleSky6 commented 5 years ago

The problem seems to have been solved in half, and the RT_RCDATA in peconv:: ALIGNED_BUF load_resource_data (OUT size_t&out_size, const int res_id, const LPSTR res_type=RT_RCDATA, HMODULE hInstance=nullptr) needs to be deleted to be compiled and passed, because onst LPSTR res_type=RT_RCDATA=MAKEINESOURCE(10) = MAKEINTRESOURCEW, can you overload this function?

hasherezade commented 5 years ago

Please check if the latest commit fixed the problem.

AppleSky6 commented 5 years ago

Thank you very much for your help, which has already solved my problem. I quoted your code and Library in my project. Where should I make a statement, please give me directions. My project link: https://github.com/Ar-King/Black-Beard-Pirates (a project used to execute code in memory for dump malware). Thank you very much for your help.

hasherezade commented 5 years ago

I am happy that it helped! Once you will be sure that no more fixes are needed, you can close this issue. LibPeConv is published under BSD-2 license so you can use it freely in your projects. You can just add a link to libpeconv repo in your readme, and mentioned that it was used - and that's all. Thanks!

AppleSky6 commented 5 years ago

Thank you very math!