Creating an Extension


 

Step 1

 

The kernel32.dll is a Shared Library which is available in all Windows Systems. This DLL allows access to the entire Windows API through a series of functions. To understand and use the available functions, we can check the Win32 Programmer's Reference:

 

tutorial_extensions_01

 

The Win32 Programmer's Reference contains detailed usage guides on each function contained in the kernel32.dll. Click on Index and type the word "beep" in the search box at the top. The Chapter on the Beep Command should be highlighted as shown below:

 

tutorial_extensions_02

 

 

With the Beep Chapter selected, click on "Display" to view the usage references shown below:

 

 

tutorial_extensions_03

 

 

The Beep function within the kernel32.dll is a simple command which executes a System Beep Tone. The reference for the Beep function shows that this function has just 2 parameters:

 

Frequency (in hertz)

Duration (in milliseconds)

 

To create a custom {mdm}Script™ Command based upon this DLL Function, it is important that we know how many parameters are required so good DLL documentation is extremely important.

 

Continue to Step 2