Jump to content
Sign in to follow this  

Get DLL function name from ProcAddress

Recommended Posts

I'm attempting to grab the dll function name from it's proc address...or the ordinal...

$h = _WinAPI_GetModuleHandle("user32.dll")
$i = _WinAPI_GetProcAddress($h,1502) ; ActivateKeyboardLayout
ConsoleWrite("address:" & $i & @CRLF)
; ordinal is 1502, function name is ActivateKeyboardLayout...trying to get 'ActivateKeyboardLayout'

Above is just an example...I'm trying to get the ordinal, in a loop, of one of our internal dlls.  The ordinal can change from build to build.

I've found other ways to do it, but it involves spamming ordinals in a second process until the output is as expected...a second process because most ordianls that are NOT the right one will cause application errors from autoit.


I started using the fully decorated function name, and it woks fine.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post

Link to post
Share on other sites

Maybe this helps you:

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...