I have seen the light at the end of the tunnel!
A scant 7 days (and 8ish hours) from now I will hopefully be tripping the fiber light fantastic. I've been dying to get my hands on FiOS for a long while. More so after my wife had her business cable line installed at the house (she's a virtual worker for an insurance company); a 26Mbps down, 5Mbps up Mississippi River of Internet goodness...*tingly shiver*.
It's been miserable this past year with that huge connection pipe sitting only a router away from me and not being able to use it at my leisure. It's more painful to know that I'm surfing away on a 1.5Mbps / 132Kbps DSL line.
But lo, three months ago the construction notifications went up at the top of our street. The flags and spray paint was layeth down! The machines rumbled and hustled, things were done, trucks scurried to and fro, and as of yesterday, I have a standing order for a 15Mbps / 2Mbps Internet connection to cometh upon my abode!
My excitement for FiOS is really two fold, I want the bump in bandwidth (hosting Halo 3, here I come!), but I also want the FiOS TV service. It appears that will have to wait until the City of Redmond (King County et. al.) allows them to start offering the FiOS TV service in this area.
I'm not unhappy with DirecTV, but I'm not terribly thrilled with them either. As a DirecTV subscriber for 14 years, I have no desire to go through another upgrade to the dish, both the receivers in my house and lose all the stuff on my TiVo in order to get the MPEG4 streams. Especially when they expect me to pay for it and they're going to be short on bandwidth again, eventually. Which will mean the return of the compression artifacts that make watching fire / smoke scenes in Rescue Me an exercise in deciphering abstract art in Lego form.
Okay enough babbling, I had mentioned two posts ago about how UMDF didn't allow for you to use specific functions for completion routines. I figured if you read through my missive about FiOS you should get a cookie or something. Since I haven't mastered my cookie teleportation device and projectile cookie delivery is still a bug I have to work out of my product-a-pult system, I'll drop some more sample code for you guys and gals and Wookiees to chew on.
A few notes here;
I'm using the context to just throw the I/O Control code around for giggles. There is a method within the IWDFIoRequest interface to get the control code if you want to use the context value for something else.
Since IWDFIoRequest has pretty much all the data buffers I would generally need for completion anyway, the context parameter really was just there to be used for something. And in some weird effort to just make things run a little bit faster, I avoided maybe one clock tick by not calling GetDeviceIoControlParameters. Yes, I'm crazy.
void
CVDevParallelQueue::OnCompletion (
__in IWDFIoRequest* pWdfRequest,
__in IWDFIoTarget* pIoTarget,
__in IWDFRequestCompletionParams* pParams,
__in PVOID pContext)
/*++
Routine Description:
Base request completion and completion dispatch routine.
Arguments:
pWdfRequest - current request.
pIoTarget - current I/O Target.
pParams - Completion params.
pContext - completion context.
Return Value:
VOID
--*/
{
ULONG ControlCode;
HRESULT hr = pParams->GetCompletionStatus ();
UNREFERENCED_PARAMETER (pIoTarget);
if (FAILED (hr))
{
pWdfRequest->Complete (hr);
return;
}
if (NULL != pContext)
{
ControlCode = (ULONG) pContext;
switch (ControlCode)
{
//
// These are place holder functions to demonstrate
// a method for dispatching to specific completion routines
//
case IOCTL_ALLOCATE_ADDRESS_RANGE:
{
this->OnAllocateAddrRangeCompletion (pWdfRequest, pParams);
}
break;
case IOCTL_FREE_ADDRESS_RANGE:
{
this->OnFreeAddrRangeCompletion (pWdfRequest, pParams);
}
break;
default:
{
pWdfRequest->Complete (hr);
}
break;
} // switch
}
else
{
//
// if we get here, we should just complete the request
// with its current status.
//
pWdfRequest->Complete (hr);
}
return;
}
*Currently playing - Buddy Holly, Well... All Right (Alt. Ver. 1)