In Delphi (2007) ShareMem must be declared as the first item in the uses of the unit you are using and also in your application file. Then declare:
function WebUpdate(strPath: string): Integer; stdcall external 'wuw4.dll';
In Delphi (2007) call the exported WebUpdate() function with:
procedure CheckForUpdatesExecute();
var strPath: string;
intResult: integer;
begin
strPath := 'http://mycompany.com/myscript.txt'
intResult := WebUpdate(strPath);
if intResult = 0 then
ShowMessage('Unable to check for updates because the update components are not installed.');
end;
var strPath: string;
intResult: integer;
begin
strPath := 'http://mycompany.com/myscript.txt'
intResult := WebUpdate(strPath);
if intResult = 0 then
ShowMessage('Unable to check for updates because the update components are not installed.');
end;
That's it! You are ready to move to the next step - authoring your update script:
Next Steps!
Having integrated the Software Update Wizard with your code,
the next step is to write your first update script:
