Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



Sign in to follow this  
loblo

My little hex hacks to complement KernelEx

Recommended Posts

loblo    23

Since KernelEx development has stalled and that I am no progammer and that I was keen on running certain applications that don't run even with KernelEx, I embarked into some experiments involving hexing functions neither present in in Windows 98/Me nor catered for by KernelEX for other ones present in Windows 98/ME and I can report some interesting successes:

ActivateActCtx -> SetLastError

CreateActCtxW -> SetLastError

DeactivateActCtx -> SetLastError

FindActCtxSectionStringW -> SetLastError

InitializeSListHead -> SetLastError

InterlockedFlushSList -> SetLastError

InterlockedPopEntrySList -> SetLastError

InterlockedPushEntrySList -> SetLastError

QueryDepthSList -> SetLastError

ReleaseActCtx -> SetLastError

It also seems to work for:

CreateTimerQueue -> SetLastError

CreateTimerQueueTimer -> SetLastError

DecodePointer -> SetLastError

DeleteTimerQueue -> SetLastError

DeleteTimerQueueTimer -> SetLastError

EncodePointer -> SetLastError

But those are already catered for by KernelEx but when I started those experiments I didn't figure out they were.

HeapQueryInformation -> SetLastError also seems to work but only when the function HeapSetInformation isn't also required, and for example you can make the latest FFDShow Tryout clsid build from Sourceforge work by merely replacing the string HeapQueryInformation by the string SetLastError in the file ffdshow.ax with an hex editor.

http://sourceforge.net/projects/ffdshow-tryout/files/SVN%20builds%20by%20clsid/generic%20builds/ffdshow_rev3984_20110922_clsid.exe/download

According to the above rules I have hexed both msvcr100.dll and msvcp100.dll and I use them to succesfully run without issues the latest Luminance HDR build which relies on them:

Hacked MSVCR100 and MSVCP100: http://www.mediafire.com/?49bc54r28b94w0x

Luminance HDR 2.1.0: http://sourceforge.net/projects/qtpfsgui/files/luminance/2.1.0/Luminance-HDR-Win32-SETUP-v2.1.0.exe/download

No guarantee those tricks will work on everything as they must be ugly as hell but it's working very well on quite a few things I now have tried them on so i thought I'd share that with everyone.

Cheers

Edited by loblo

Share this post


Link to post
Share on other sites

nishants52    0

Since KernelEx development has stalled and that I am no progammer and that I was keen on running certain applications that don't run even with KernelEx, I embarked into some experiments involving hexing functions neither present in in Windows 98/Me nor catered for by KernelEX for other ones present in Windows 98/ME and I can report some interesting successes...

WoW! Nice !

Share this post


Link to post
Share on other sites
rloew    93
ActivateActCtx -> SetLastError

CreateActCtxW -> SetLastError

DeactivateActCtx -> SetLastError

FindActCtxSectionStringW -> SetLastError

InitializeSListHead -> SetLastError

InterlockedFlushSList -> SetLastError

InterlockedPopEntrySList -> SetLastError

InterlockedPushEntrySList -> SetLastError

QueryDepthSList -> SetLastError

ReleaseActCtx -> SetLastError

The number of arguments used by many of these functions is not the same as SetLastError. This can cause Stack Faults depending upon how they are used.

Share this post


Link to post
Share on other sites
loblo    23
The number of arguments used by many of these functions is not the same as SetLastError. This can cause Stack Faults depending upon how they are used.

Well, as I have said:

No guarantee those tricks will work on everything as they must be ugly as hell

:lol:

If you can come up with something better, and I am certain you've got the potential for that, you are more than welcome. :yes:

Cheers.

Edited by loblo

Share this post


Link to post
Share on other sites
rloew    93
The number of arguments used by many of these functions is not the same as SetLastError. This can cause Stack Faults depending upon how they are used.

Well, as I have said:

No guarantee those tricks will work on everything as they must be ugly as hell

:lol:

If you can come up with something better, and I am certain you've got the potential for that, you are more than welcome. :yes:

Cheers.

I do have a redirector that is in my Large File Emulator. Creating a stub DLL with separate stubs for each different parameter count would be simple. Different return codes could be handled as well.

Share this post


Link to post
Share on other sites
M()zart    3

It's easy to add stubs in the KernelEx code itself (to the libraries that already are there, I didn't figure out how to add a functions to the DLLs that are not already there in the apilibs folder. May be I just have not tried well.) May be it's better to add stubs to KernelEx than to edit exe files?

Share this post


Link to post
Share on other sites
loblo    23

It's easy to add stubs in the KernelEx code itself (to the libraries that already are there, I didn't figure out how to add a functions to the DLLs that are not already there in the apilibs folder. May be I just have not tried well.) May be it's better to add stubs to KernelEx than to edit exe files?

I don't think that stuff should be added to KernelEx since none of those functions are properly emulated. I think it works because those functions are useless and are bypassed by using instead a function that is used anyway and can be run several time without changing anything and returns nothing. (If this is not correct, I am more than willing to learn from the mouth of someone who is knowldgeable enough why this works so well.)

I couldn't get MFC100 to work so far unfortunately and I don't think I'll be able to. :}

Edited by loblo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×