You cannot do this directly in VBScript. As Josh Einstein commented above, it is not possible to call native Windows API functions from VBScript right away. There are two main reasons why this is so. First, it would create obvious security risks for code written in such a scripting language to be able to directly name its own code. And secondly, VBScript has only one data type ( Variant), which will not work correctly with the return values of most Windows API functions.
API, ActiveX DLL ( COM), , VBScript. DLL- VBScript- , Variant ( !) . VB 6 - , ++, .