plAddImportFunction

The plAddImportFunction function adds a Function to the Import Table.
plAddImportFunction( LPTSTR plLibraryName, // Name of the library
LPTSTR plFunctionName // Name of Function );
Parameters
plLibraryName
Contains a pointer to the string, which must contain the name of the library, where the function to import is defined. Take a look at the example.
plFunctionName
Containts a pointer to the name of the function string.
Return Value
If the function succeeds, the return value is the Virtual Address (VA) to the functions address.This means that if the return value is 00401234 you can call this function from inside the program like this:
call dword ptr [00401234].
Example
.data library db "user32.dll",0
func db "MessageBoxA",0
.code invoke plAddImportFunction, addr library, addr func |
See Also
plEnumImportFunctions, plGetImportsInfo

Pumqara <programs@mail.bg> 2004. All rights reserved.