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

SafeDiscShim and DxWnd integration #10

Open
ghotik opened this issue Mar 27, 2024 · 4 comments
Open

SafeDiscShim and DxWnd integration #10

ghotik opened this issue Mar 27, 2024 · 4 comments

Comments

@ghotik
Copy link

ghotik commented Mar 27, 2024

I apologize to repeat here some of the questions I made in the closed thread, but I was not sure that you read it.
So, I'll repeat some questions trying to be short and not to steal too much of your time:

  1. could you suggest a SafeDisc target for testing that works with your shim? I picked "Age of Empires II" but I'm not sure it would be the easiest case, since in this case there is a drvmgt.dll file in the game folder
  2. In your opinion it would be correct to hook kernel32:DeviceIoControl in addition to ntdll:NtDeviceIoControlFile? I did that and it seemed ok, but I don't know ...
  3. The Process::Relaunch() method in your project seems unreferenced, is that correct?
  4. if you have time, please read the longer plea in the original thread

Thank you,
Gho

@RibShark
Copy link
Owner

  1. Try a later SafeDisc game such as Pac-Man World Rally; though they should all work.
  2. You shouldn't need to hook DeviceIoControl, since internally it calls NtDeviceIoControlFile anyway.
  3. No, it is called here. But this shouldn't matter since your injection mechanism won't rely on detecting the cleanup exe.
  4. Hooking drvmgt.dll should also be irrelevant for your usecase, as that is only done to inject into SafeDisc v1 executables and you have your own injection mechanism. It would be great if you could display a dialog for the unhandled IoControlCode, though so far I have not seen any reports of a game using it.

@RibShark
Copy link
Owner

As an aside, I was wondering if you could use your expertise with DirectX to help me fix an issue with a game when alt-tabbing from fullscreen mode; if you are willing to help please tell me where would be best to contact you.

@ghotik
Copy link
Author

ghotik commented Mar 28, 2024

... please tell me where would be best to contact you

I would suggest to create a thread on the DxWnd forum on SourceForge ( https://sourceforge.net/p/dxwnd/discussion/general/ ) because that is the place where I check my messages more often, but any other place would be OK. By the way, SF has a private mailing system that would allow to exchange private information (like my email address) to establish an even tighter contact, if necessary.

@ghotik
Copy link
Author

ghotik commented May 14, 2024

Some news here: https://sourceforge.net/p/dxwnd/discussion/general/thread/15812bad5f/?page=2#f0cf
The summary: I bought a USB CD reader to test some Genuine CDs with Safedisc protection on my Win11, a configuration that should be useful for nostalgic guys that kept some CDs in a drawer. But the results were unexpected:

Game                                          Safedisc version  - without SafediscShim - with SafeDiscShim
----------------------------------------------------------------------------------------------------------
Black & White 2                               4.0.2                   not working              not working
Rise of Nations                               2.70.30                 working                  working
Divine Divinity                               2.70.30                 not working              not working

With these first 3 games it seems that SafeDiscShim had no effect on the games. I wonder why ...

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

No branches or pull requests

2 participants