What DLL is processthreadsapi/GetCurrentProcessId located in?

1 view
Skip to first unread message

T

unread,
Nov 18, 2022, 4:47:01 AM11/18/22
to
Hi All,

I am trying to make from Raku a call to


GetCurrentProcessId function (processthreadsapi.h)

https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getcurrentprocessid

Raku's compiler does not liek

sub GetCurrentProcessId()
is native("processthreadsapi")
is symbol("GetCurrentProcessId")
returns DWORD
{ * };

It can't find "processthreadsapi.dll".

What dll is GetCurrentProcessId located in?

Many thanks,
-T

R.Wieser

unread,
Nov 18, 2022, 6:40:07 AM11/18/22
to
T,

> What dll is GetCurrentProcessId located in?

Its located in Kernel32.dll

Next time when you want to figure it out you could do worse than to search
"learn.microsoft.com" for it (perhaps like this : "site:learn.microsoft.com
GetCurrentProcessId". Works for several search engines, not just Google),
and than, on the returned MS webpage, look at the "Requirements" box at the
bottom. It mostly has a "DLL" entry.

Regards,m
Rudy Wieser


Apd

unread,
Nov 18, 2022, 6:57:31 AM11/18/22
to
"T" wrote:
> I am trying to make from Raku a call to
>
> GetCurrentProcessId function (processthreadsapi.h)

That's the C header file containing its definition.

> https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getcurrentprocessid

> It can't find "processthreadsapi.dll".

Because it's not a DLL

> What dll is GetCurrentProcessId located in?

kernel32.dll - it says so in the MS docs above.


T

unread,
Nov 18, 2022, 6:59:40 AM11/18/22
to
Hi Rudy,

The did the trick. Thank you!

And I FINALLY found it at the bottom of the link
I posted in the "requirements section". Grrrrrr


-T

T

unread,
Nov 18, 2022, 7:00:46 AM11/18/22
to
That was it. Thank you!

> - it says so in the MS docs above.
>
>


Way at the boot under teh "Requirement" section. Grrrr...

R.Wieser

unread,
Nov 18, 2022, 7:29:19 AM11/18/22
to
T,

> The did the trick. Thank you!

You're welcome.

> And I FINALLY found it at the bottom of the link
> I posted in the "requirements section". Grrrrrr

:-) That has never happend to me. No sirree. Never ! :-)

Regards,
Rudy Wieser


Reply all
Reply to author
Forward
0 new messages