Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rm unneeded windows api calls #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

VIRUXE
Copy link

@VIRUXE VIRUXE commented May 12, 2024

filesystem already has mostly everything we need, minus LoadLibraryW

added a safety check as bonus

`filesystem` already has mostly everything we need, minus LoadLibraryW
rudimentary check to make sure `.asi` files are actual DLL's

most likely redundant. but you never know when someone might want to do something weird
Copy link
Owner

@carlos-menezes carlos-menezes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Here are some changes I would consider:

dllmain.cpp Outdated Show resolved Hide resolved
dllmain.cpp Outdated
WIN32_FIND_DATAW findFileData;
HANDLE hFind = FindFirstFileW(directory.c_str(), &findFileData);
char header[2];
file.read(header, 2);
Copy link
Owner

@carlos-menezes carlos-menezes May 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An error may occur here, so we should check if an error happened (and return FALSE as well).

@VIRUXE VIRUXE changed the title rm unneeded window api calls rm unneeded windows api calls May 14, 2024
decided to just compact this up a bit more and introduce logging, along with some more safeguards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants