Monday, November 10, 2008

Declare Method

Description
Declares references to external procedures in a dynamic-link library (DLL).
Once you use the Declare method for a method, you can use the Extern object to call the declared method.

Syntax
Extern.Declare(RetType, MethodName, LibName, Alias [, ArgType(s)])

ArgumentTypeDescription
RetTypeStringData type of the value returned by the method.
MethodNameStringAny valid procedure name.
LibNameStringName of the DLL or code resource that contains the declared procedure.
AliasStringName of the procedure in the DLL or code resource.
Note:DLL entry points are case sensitive.
Note: If Alias is an empty string, MethodName is used as the Alias.
ArgType(s)StringA list of data types representing the data types of the arguments that are passed to the procedure when it is called.
Note: For out arguments, use the micByRef flag.
[For more info on this see QTP Guide]