MSFN Forum: My little hex hacks to complement KernelEx - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

My little hex hacks to complement KernelEx Rate Topic: -----

#1 User is offline   loblo 

  • Oldbie
  • PipPipPipPip
  • Group: Members
  • Posts: 677
  • Joined: 12-January 10
  • OS:ME
  • Country: Country Flag

Posted 01 October 2011 - 04:50 AM

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

This post has been edited by loblo: 01 October 2011 - 04:51 AM



#2 User is offline   nishants52 

  • .:. BIOS .:.
  • Group: Members
  • Posts: 34
  • Joined: 29-May 11
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 01 October 2011 - 07:41 AM

View Postloblo, on 01 October 2011 - 04:50 AM, said:

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 !

#3 User is offline   rloew 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 932
  • Joined: 30-May 05
  • OS:98SE
  • Country: Country Flag

Posted 01 October 2011 - 04:14 PM

View Postloblo, on 01 October 2011 - 04:50 AM, said:

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.

#4 User is offline   loblo 

  • Oldbie
  • PipPipPipPip
  • Group: Members
  • Posts: 677
  • Joined: 12-January 10
  • OS:ME
  • Country: Country Flag

Posted 02 October 2011 - 11:01 AM

View Postrloew, on 01 October 2011 - 04:14 PM, said:

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:

Quote

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.

This post has been edited by loblo: 02 October 2011 - 11:01 AM


#5 User is offline   rloew 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 932
  • Joined: 30-May 05
  • OS:98SE
  • Country: Country Flag

Posted 02 October 2011 - 12:14 PM

View Postloblo, on 02 October 2011 - 11:01 AM, said:

View Postrloew, on 01 October 2011 - 04:14 PM, said:

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:

Quote

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.

#6 User is offline   M()zart 

  • Member
  • PipPip
  • Group: Members
  • Posts: 243
  • Joined: 17-June 08

Posted 03 October 2011 - 07:45 AM

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 User is offline   loblo 

  • Oldbie
  • PipPipPipPip
  • Group: Members
  • Posts: 677
  • Joined: 12-January 10
  • OS:ME
  • Country: Country Flag

Posted 04 October 2011 - 01:47 PM

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 User is offline   loblo 

  • Oldbie
  • PipPipPipPip
  • Group: Members
  • Posts: 677
  • Joined: 12-January 10
  • OS:ME
  • Country: Country Flag

Posted 04 October 2011 - 01:59 PM

View PostM()zart, on 03 October 2011 - 07:45 AM, said:

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. :}

This post has been edited by loblo: 04 October 2011 - 02:06 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy