Русский   Home

Register Method

This method registers a function exported by a DLL as an object method. The function is identified by its name or ordinal. The meaning of "i=", "r=" and "f=" is explained in the remarks.

Registration by name
DWX = new ActiveXObject("DynamicWrapperX");
DWX.Register("user32.dll", "MessageBoxW", "i=hwwu", "r=l");
res = DWX.MessageBoxW(0, "Hello, world!", "Test", 4); // Call.
Registration under a different name
DWX.Register("user32:BadName", "GoodName", "r=n", "f=t");
// BadName might be a function name that contains characters
// not allowed in method names, or simply is too long.
Registration by ordinal
DWX.Register("user32:110", "MethodName", "i=p", "r=l");
DWX.Register("user32:0x6E", "MethodName", "i=p", "r=l");