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

Fix pointer type on QueryAttributesFile #3

Merged
merged 1 commit into from
May 22, 2024

Conversation

NotNite
Copy link
Contributor

@NotNite NotNite commented May 22, 2024

When attempting to use the redirector with Rabbit and Steel, my game would crash on startup as well as Reloaded internals itself failing. I tracked this down to a bug in the NtQueryAttributesFile hook. MSDN defines NtQueryAttributesFile as FileInformation to be PFILE_BASIC_INFORMATION (a pointer to FILE_BASIC_INFORMATION), but it was defined as a uint in the PR that added it, which is not pointer-sized on x64. I don't know if this works with x86, as I don't have a game to test it with, but I would presume IntPtr will resolve to size 4 on x86.

@Sewer56
Copy link
Member

Sewer56 commented May 22, 2024

I don't know if this works with x86, as I don't have a game to test it with, but I would presume IntPtr will resolve to size 4 on x86.

Yeah IntPtr is native register sized.

@Sewer56 Sewer56 merged commit 37ff1d9 into Reloaded-Project:master May 22, 2024
@Sewer56
Copy link
Member

Sewer56 commented May 22, 2024

Also so sorry this old project has to exist.
If you look at one of the other branches, I rewrote the whole thing and made a full scale virtual filesystem.

Just couldn't release it due to GC Transition Shenanigans.

@NotNite
Copy link
Contributor Author

NotNite commented May 22, 2024

No problem - I'm glad it exists (and I wrote my own equivalent for file swapping inside of the game data, lol).

If it's not too much of an inconvenience, could a release be published sometime later today/tomorrow? I wrote a guide for our modding community on how to swap textures, and only decided to test that it worked after I committed it 😅

@Sewer56
Copy link
Member

Sewer56 commented May 22, 2024

No worries, I'm quick with these things.
I usually just gotta update NuGet keys etc. to fixup CI when doing these things.

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