|
|
I don't know much about DELPHI so can't tell you if there is something wrong
with the code. But you could turn on BITS logging to debug this issue
further. Please run the following instructions from a command prompt:
set BitsRegKey=HKLM\Software\Microsoft\Windows\CurrentVersion\BITS
reg add %BitsRegKey% /v LogFileFlags /t REG_DWORD /d 0xfbcf /f
reg add %BitsRegKey% /v LogFileSize /t REG_DWORD /d 0x100 /f
reg add %BitsRegKey% /v LogFileMinMemory /t REG_DWORD /d 0x30 /f
net stop bits
net start bits
After this reproduce the problem by running your delphi code. Once you get
the error stop the BITS service using the following command
net stop bits
Send me the following files %windir%\system32\bits.log and
%windir%\system32\bits.bak (if it exists). You can send it directly to me by
removing "online" in my email address.
--
Narayana Mahankali
Microsoft, BITS
This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"gm" <gmcdanie@xxxxxxxxxxx> wrote in message
news:1120148468.444449.139420@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Using bits2_0.idl I made bits2_0.tlb
>
> I am using Delphi for the COM Client to BackgroundCopyManager.
> Using this code to test BackgroundCopyManager.
>
> procedure TForm1.FormCreate(Sender: TObject);
> var
> test : IBackgroundCopyManager;
> jobs : IEnumBackgroundCopyJobs;
> begin
> test := CoBackgroundCopyManager2_0_.Create;
>
> try
> SetLastError(0);
> test.EnumJobs(0, jobs);
> jobs := nil;
> except
> on E: Exception do
> begin
> messageDlg(E.Message);
> messageDlg(IntToStr(GetLastError));
> end;
> end;
>
> test := nil;
> end;
>
> test.EnumJobs(0,jobs) will always give me access violation even though
> I am running as an administrator. Looking up Win API GetLastError gives
> me 1411 ERROR_CLASS_DOES_NOT_EXIST. But notice that the coclass creates
> IBackgroundCopyManager just fine. And I know bits is working (v2.0)
> because WindowsUpdate runs just fine.
>
> Ideas?
>
|
|