I noticed my submission yesterday was a little undercooked and since I have spent some more time on it, I thought I'd try to submit a (hopefully) proper patch to the list. This is a rough implementation of K32EnumDeviceDrivers and K32GetDeviceDriverBaseNameA.
Anthony Lauzon anthony.lauzon@gmail.com writes:
- status = NtQuerySystemInformation(SystemModuleInformation,
smi,
SystemInformationLength,
&ReturnLength);
- ULONG i;
- /* Try to find which module matches the base address given */
- for (i = 0; i < smi->ModulesCount; ++i)
- {
if (i >= cb/sizeof(LPVOID)) {
break;
}
image_base[i] = smi->Modules[i].ImageBaseAddress;
- }
This is enumerating the modules loaded in the current process, it doesn't have anything to do with device drivers. What problem are you trying to solve?
I followed the ReactOS code and the documentation from Microsoft for the EnumDeviceDrivers function for this code. I'm attaching a link to the stack trace from the program I'm trying to run. It's the Creative E-MU Emulator X3. The error is an invalid floating point for 32-bit code error. emux3_trace.log https://drive.google.com/file/d/1JLHO-J3lNgUVgvMK8M8BsxNnX8kTycqJ/view?usp=drive_web
On Thu, Jul 12, 2018 at 6:08 AM Alexandre Julliard julliard@winehq.org wrote:
Anthony Lauzon anthony.lauzon@gmail.com writes:
- status = NtQuerySystemInformation(SystemModuleInformation,
smi,
SystemInformationLength,
&ReturnLength);
- ULONG i;
- /* Try to find which module matches the base address given */
- for (i = 0; i < smi->ModulesCount; ++i)
- {
if (i >= cb/sizeof(LPVOID)) {
break;
}
image_base[i] = smi->Modules[i].ImageBaseAddress;
- }
This is enumerating the modules loaded in the current process, it doesn't have anything to do with device drivers. What problem are you trying to solve?
-- Alexandre Julliard julliard@winehq.org