Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting handle count of current process
#1
Is this the correct way to get the handle count of the current process?
Function GetHandleCount
Code:
Copy      Help
function#

;Returns handle count of current process
int handleCount
dll kernel32 #GetProcessHandleCount hProcess *pdwHandleCount

if GetProcessHandleCount(GetCurrentProcess &handleCount)
,ret handleCount

I'm unsure if it's OK to have the dll declaration in the function code body or if I should put this somewhere else? Thanks.
#2
Dll function declarations can be anywhere. In this case don't need declaration.
#3
Thanks - you're right about not needing the dll declaration. Why is this not needed? I see that it's defined in winapi.txt - are these declarations added dynamically?
#4
Yes. Don't need to declare many Windows API functions. Need only if error "unknown identifier".


Forum Jump:


Users browsing this thread: 1 Guest(s)