DLL Testing

Purpose

You can create objects and invoke methods from both managed and unmanaged dlls.

Usage

Rapise provides API calls to work with managed DLLs. The Windows object WScript can be used with unmanaged DLLs.

Managed DLLs

Unmanaged DLLs

The Register and ShellExecute methods of the DynamicWrapper object can be used to invoke DLL methods as in the following example:

var UserWrap = WScript.CreateObject("DynamicWrapper");
UserWrap.Register("shell32.dll", "ShellExecute", "I=hssssl", "f=s", "r=l");
UserWrap.Register("USER32.DLL", "MessageBoxA", "I=HsSu", "f=s", "R=l");
UserWrap.MessageBoxA( null, "" + elapsed, "Time Elapsed:",  0x30 );

Test Samples

There are two test samples that illustrate working with DLLs:

See Also