microsoft.public.windows.backgroundtransfer
[Top] [All Lists]

Re: Disappearance act of BITS job

Subject: Re: Disappearance act of BITS job
From: "Scott White [MSFT]"
Date: Wed, 13 Apr 2005 19:38:27 -0700
Newsgroups: microsoft.public.windows.backgroundtransfer
Did you create your assembly from the .idl files using MIDL and tlbimp? If
so, MIDL can't convert the structure used by SetCredentials. If you want to
use SetCredentials from C# or VB.Net, you need to create a managed C++
wrapper that calls SetCredentials. Email me if you need help and I'll attach
a wrapper that does this.

Your other problem (jobs disappearing) is a vtable problem that's occurring
when you try to have Job2 inherit from Job. When you call SetCredentials,
you are actually calling Cancel.

-- 
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

<TDeveloperDotNET@xxxxxxxxxxx> wrote in message
news:1112311060.800242.196470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I am stumped. After a few weeks of tackling with trying to use
> SetCredentials() with BITS with no luck, I finally found a good use for
> the BITSAdmin tool to help me debug my job's status and such as I step
> through my VB .NET code.
>
> Briefly, I created IBackgroundCopyJob2 in my BITSInterop.vb file, and
> this interface inherits IBackgroundCopyJob. My only reason to use
> IBackgroundCopyJob2 is so that I can implement the SetCredentials()
> method.
>
> Here's my dilema: after I created a new job (using IBackgroundCopyJob),
> and cast it to IBackgroundCopyJob2, a new job is created and I can see
> its "Suspended" status in BITSAdmin. However, after I set my job's
> credentials via SetCredentials(), this job just disappear from my queue
> (I checked that this does in fact happen in BITSAdmin)!! I am quite
> puzzled by this.
>
> Any light you can shed on me is greatly appreciated...
>
> Thanks,
> TD
>



<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy