Jump to content
Excelsior Forums
Sign in to follow this  
Gregory

xFuntion newcomer

Recommended Posts

Hi *,

I am trying to call a kernel32 function but without much sucess. The function I want to call is:

SetProcessWorkingSetSize

Part of the problems I have is due to the fact that I don't know the exact signature of this function.

The description of this function on Microsoft Site does not reaply help nme further:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setprocessworkingsetsizeex.asp

To help solve this issue I used a DLL explorer and got the following signature:

function SetProcessWorkingSetSize(hProcess: THandle; dwMinimumWorkingSetSize,

      dwMaximumWorkingSetSize: DWORD):

Yet, neither DWORD nor THandle is something that xFunction understands.

Please help!!!

thanks,

Gergory.

Share this post


Link to post
Share on other sites

Hello,

The signature of the function you need is:

BOOL WINAPI SetProcessWorkingSetSize(

  HANDLE hProcess,

  SIZE_T dwMinimumWorkingSetSize,

  SIZE_T dwMaximumWorkingSetSize

);

As HANDLE and SIZE_T are both 32-bits wide in WIN32 you should use this signature in xFunction:

"int SetProcessWorkingSetSize (int, int, int)"

Regards,

Pavel

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  

×