WUW4.dll - The Web Update Wizard Dynamic Link Library

The wuw4.dll file is a Windows dynamic link library, which your application uses to communicate with the Web Update Wizard Service application.  If you are instead calling wuwstub.exe from your application then wuwstub.exe uses wuw4.dll to communicate with the Web Update Wizard service (WebUpdateSvc.exe) and launches the Web Update Wizard User Interface component (WuWUI.exe).

Wuw4.dll contains 2 exported functions:

WebUpdate(URL)

and

WebUpdateWait(URL, TimeOut)

 

The first function, WebUpdate(), passes the URL of the update script to the Web Update Wizard and returns immediately.  It therefore causes the Web Update Wizard to work asynchronously (i.e. in parallel) with your application.

The WebUpdateWait() function passes the URL and a timeout in milliseconds ('000ths of a second) to wuw4.dll.  However, the WebUpdateWait() function in wuw4.dll does not return until the Web Update Wizard has completely finished processing the call.  It therefore causes the Web Update Wizard to work synchronously (i.e. sequentially) with your application.  Note that the milliseconds argument causes control to return to your program either when the specified time is up or when the Web Update Wizard has finished, whichever occurs earlier.

When the DLL receives the URL of the update script it then either sends the URL through a named pipe to the Web Update Wizard Service.

The declaration of the WebUpdate() function from the (supplied) WebUpdate.h file is shown here:

//////////////////////////////////////////////////////////////////
// Web Update Wizard DLL Header File
// © Peter Boulton, Data Perceptions / PowerProgrammer - 2002-2005
//////////////////////////////////////////////////////////////////
// The one and only function - WebUpdate(LPCTSTR szURL) where
// szURL is the URL of the server update script file.
// Function returns 1 if successful, else 0.
// Note __stdcall calling convention for use in VB
// Example call:
//
//        WebUpdate("http://www.myserver.com/update.txt");
//
// Here is an example VBA call:
//  --------------------------------------------------------------------------------------------------------------
//    Private Declare Function WebUpdate Lib "D:\MSDEV\Projects\wuw\Release\wuw4.dll" (ByVal URL As String) As Long
//  --------------------------------------------------------------------------------------------------------------
//    Private Sub CommandButton1_Click()
//
//    Dim myURL As String
//    myURL = "http://localhost/prophecy/prophecyupdate.txt"
//    Call WebUpdate(myURL)
//
//    End Sub

/////////////////////////////////////////////////////////////////////////////////////////
// Implementation 1: Returns immediately on launching Web Update Wizard
int __stdcall WebUpdate(LPCTSTR URL);
/////////////////////////////////////////////////////////////////////////////////////////
// Implementation 2: Returns after Web Update Wizard has finished parsing script file and,
//                   if necessary, downloading the updates, or after nTimeOut milliseconds,
//                   whichever occurs earlier.
int __stdcall WebUpdateWait(LPCTSTR szURL, UINT nTimeOut);
/////////////////////////////////////////////////////////////////////////////////////////

Notes