Rem: Calling a Win32 API in VBScript Code

How can I call a Win32 API in VBScript code?

You can't natively call a Win32 API in VBScript code, but several independent developers have created custom components that provide this capability. Perhaps the most popular components are Ton Plooy's DynaCall() function and Jeff Stong's DynaWrap automation component, which is based on the DynaCall() function.

To learn more about DynaCall(), read the Windows::Developer Journal article "A DynaCall() Function for Win32," You can access this article online after you register, and you can download the article's code, which includes the dynacall.dll file, from

Unfortunately, a Windows::Developer Journal article about DynaWrap, titled "An Automation Object for Dynamic DLL Calls," is no longer available online. However, you can still download the DynaWrap code from

Several independent Web sites host additional information about DynaCall() and DynaWrap, including updated components and sample scripts. After a quick review, I've found the following Web sites to be the most useful: and

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.