pixeltris / YgoMaster

Offline Yu-Gi-Oh! Master Duel
MIT License
886 stars 127 forks source link

DetourCreateProcessWithDll failing with error code 6 #260

Closed evil1hero closed 1 year ago

evil1hero commented 1 year ago

always the same issue

New Bitmap Image (6) New Bitmap Image (5)

pixeltris commented 1 year ago

Unfortunately I'm unable to help as I cannot reproduce this. DetourCreateProcessWithDll with error code 6 means ERROR_INVALID_HANDLE. This function would need to be debugged https://github.com/microsoft/Detours/blob/4.0.1/src/creatwth.cpp#L733-L788

You could try changing this: https://github.com/pixeltris/YgoMaster/blob/73e3a6aa45f0d64f6fc56ace84773837e22dcb92/YgoMasterClient/Program.cs#L109

To

success = GameLauncher.Launch(GameLauncherMode.StealEntryPoint);

Then recompiling the code. Though that method of launching isn't tested often so there isn't really any support for it.

evil1hero commented 1 year ago

Please tell me how to fix it because I don't know how please😭😭😭

evil1hero commented 1 year ago

What am I supposed to do with the code?

evil1hero commented 1 year ago

Please tell me where I can find these commands

pixeltris commented 1 year ago

v1.38 adds this setting:

https://github.com/pixeltris/YgoMaster/blob/7d6e33632104d7d687638813a48c51b7d89c403d/YgoMaster/Data/ClientData/ClientSettings.json#L50

Try changing it to:

"LaunchMode": "StealEntryPoint",

evil1hero commented 1 year ago

I did what you told me but nothing changed at all......look New Bitmap Image (6)

pixeltris commented 1 year ago

I'm unable to help further. Sorry.