Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

My little hex hacks to complement KernelEx

- - - - -

  • Please log in to reply
7 replies to this topic

#1
loblo

loblo

    Oldbie

  • Member
  • PipPipPipPipPip
  • 765 posts
  • Joined 12-January 10
  • OS:ME
  • Country: Country Flag
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.n...id.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...49bc54r28b94w0x

Luminance HDR 2.1.0: http://sourceforge.n....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, 01 October 2011 - 04:51 AM.



How to remove advertisement from MSFN

#2
nishants52

nishants52

    .:. BIOS .:.

  • Member
  • 34 posts
  • Joined 29-May 11
  • OS:Windows 7 x64
  • Country: Country Flag

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 !

I want to chnage the world but the god is not giving me the source code


#3
rloew

rloew

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,120 posts
  • Joined 30-May 05
  • OS:98SE
  • Country: Country Flag

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.
Ye who enter my domain. Beware! Lest you become educated in the mysteries of the universe and suffer forever from the desire to know more.

#4
loblo

loblo

    Oldbie

  • Member
  • PipPipPipPipPip
  • 765 posts
  • Joined 12-January 10
  • OS:ME
  • Country: Country Flag

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, 02 October 2011 - 11:01 AM.


#5
rloew

rloew

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,120 posts
  • Joined 30-May 05
  • OS:98SE
  • Country: Country Flag

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.
Ye who enter my domain. Beware! Lest you become educated in the mysteries of the universe and suffer forever from the desire to know more.

#6
M()zart

M()zart

    Member

  • Member
  • PipPip
  • 283 posts
  • Joined 17-June 08
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?

#7
loblo

loblo

    Oldbie

  • Member
  • PipPipPipPipPip
  • 765 posts
  • Joined 12-January 10
  • OS:ME
  • Country: Country Flag
Jeskola XS-1, (the best soundfont player VST there is IMO) runs absolutely fine with the hacked MSVCR100 and MSVCP100 I posted above.

http://jeskola.net/xs1/

:thumbup

#8
loblo

loblo

    Oldbie

  • Member
  • PipPipPipPipPip
  • 765 posts
  • Joined 12-January 10
  • OS:ME
  • Country: Country Flag

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, 04 October 2011 - 02:06 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users