This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Connect
- :
- FlexNet Connect Forum
- :
- Re: Background Downloading with Delphi
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 19, 2003
05:30 AM
Background Downloading with Delphi
I am trying to use new Background Downloading function of Update Srvice ver.2.0 with Delphi. I tried to modify VB example given:
......
var
UpdateAgent : IAgentEx;
UpdateCollection : IUpdates;
WithEvents,UpdateInstance : IUpdate;
iIndex : integer;
begin
UpdateAgent := CoAgent.Create;
if UpdateAgent.IsConnectedEx(pszProductCode) then
begin
UpdateCollection := UpdateAgent.EnumUpdates(pszProductCode);
For iIndex := 1 To UpdateCollection.Count do
begin
UpdateInstance := UpdateCollection.Item[iIndex];
If (UpdateInstance.IsNextUse = True) Then
If (UpdateInstance.Download(True) = True) Then
UpdateInstance.Execute;
End;
end;
but I am getting Delphi error message for the line in red, saying that I cannot assign UpdateInstance IUpdate object to an OLE Variable UpdateCollection.Item[iIndex].
Can anyone help?
......
var
UpdateAgent : IAgentEx;
UpdateCollection : IUpdates;
WithEvents,UpdateInstance : IUpdate;
iIndex : integer;
begin
UpdateAgent := CoAgent.Create;
if UpdateAgent.IsConnectedEx(pszProductCode) then
begin
UpdateCollection := UpdateAgent.EnumUpdates(pszProductCode);
For iIndex := 1 To UpdateCollection.Count do
begin
UpdateInstance := UpdateCollection.Item[iIndex];
If (UpdateInstance.IsNextUse = True) Then
If (UpdateInstance.Download(True) = True) Then
UpdateInstance.Execute;
End;
end;
but I am getting Delphi error message for the line in red, saying that I cannot assign UpdateInstance IUpdate object to an OLE Variable UpdateCollection.Item[iIndex].
Can anyone help?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 27, 2003
09:26 AM
You must declare:
UpdateInstance : OleVariant;
then it works fine. It just does not use a static interface, see importfile.
UpdateInstance : OleVariant;
then it works fine. It just does not use a static interface, see importfile.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2003
04:27 AM
Thanks. It works great now:)