Doubts Regarding Prelogon Access Providers (VPN,Wireless) RRS feed

  • Question

  • 1. Wrapper for prelogon VPN (CLSID_RASProvider)
       Rqmnt: want to add one more field for Passcode in default RAS provider

       Issue: New field called "Passcode" is coming in Tile but internally in our EAP module's EAP_CONFIG_INPUT_FIELD_ARRAY
       We are getting only two fields
           1. EapConfigInputUsername
        2. EapConfigInputPassword
        Qn:What are the things we need to do in order to get our Passcode field in "EAP_CONFIG_INPUT_FIELD_ARRAY" of our EAP module?

       extern "C" DWORD WINAPI RasEapQueryUserBlobFromCredentialInputFields(
        IN  DWORD           dwEapTypeId,
        IN  HANDLE          hUserImpersonationToken,
        IN  DWORD           dwFlags,
        IN  const BYTE*     pConnectionDataIn,
        IN  DWORD           dwSizeOfConnectionDataIn,
        IN  const EAP_CONFIG_INPUT_FIELD_ARRAY* pEapConfigFieldsArray,
        OUT BYTE**          ppUserDataOut,
        OUT DWORD*          pdwSizeOfUserDataOut

       What we did:
       Following field needs to be added
       static const CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR s_rgCredProvFieldDescriptors[] =
       Accordingly I modified
       HRESULT CProvider::GetFieldDescriptorCount(
        DWORD* pdwCount
     hr = m_pWrappedProvider->GetFieldDescriptorCount(&(m_dwWrappedDescriptorCount));
            if (SUCCEEDED(hr))
                // Note that we need to add our own credential count to the wrapped credential's
                // total count.
                *pdwCount = m_dwWrappedDescriptorCount + 1;
       HRESULT CProvider::GetFieldDescriptorAt(
              DWORD dwIndex,
          if (dwIndex < m_dwWrappedDescriptorCount)
        hr = m_pWrappedProvider->GetFieldDescriptorAt(dwIndex, ppcpfd);
               // Otherwise, check to see if it's ours and then handle it here.
                   // Offset into the descriptor count so we can index our own fields.
                   dwIndex -= m_dwWrappedDescriptorCount;

                   // Verify dwIndex is still a valid field.
                   if (dwIndex < SFI_NUM_FIELDS)
                       hr = FieldDescriptorCoAllocCopy(s_rgCredProvFieldDescriptors[dwIndex], ppcpfd);
                       (*ppcpfd)->dwFieldID += m_dwWrappedDescriptorCount;
     return hr;

    2. Wrapper for PreLogon Wireless LAN Credential provider (CLSID_OnexCredentialProvider [?])
       Rqmnt: want to write a wrapper for Prelogon Wireless LAN credential provider
       Issue: We are getting only Windows default prelogon wireless credential provider our Credential provider is not being displayed.
              SetUsageScenario for our CP is not being invoked ...Looks like this is being filtered out.
       Qn   : what we need to write a wrapper for prelogon wireless Provider?
       What we did:
            In our CP module's SetUsageScenario we instantiated CLSID_OnexCredentialProvider
     [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{437C3703-E025-4530-8D0E-3142C34ECA0F}]



     HRESULT OurProvider:Tongue TiedetUsageScenario(
         DWORD dwFlags
         HRESULT hr;
         IUnknown *pUnknown = NULL;
         hr = ::CoCreateInstance(CLSID_OnexCredentialProvider, NULL, CLSCTX_ALL, IID_PPV_ARGS(&pUnknown));
         if (SUCCEEDED(hr))
             hr = pUnknown->QueryInterface(IID_PPV_ARGS(&(_pWrappedProvider)));
             if (SUCCEEDED(hr))
                 hr = _pWrappedProvider->SetUsageScenario(cpus, dwFlags);
     return hr;


    Monday, November 10, 2008 7:10 AM


  • Hi


    These forums are focused on supporting the Vista client end user.


    You need to post this message to one of the MSDN Forums for Vista developers.


    Here is a link for your convenience.


    MSDN Forums:




    If this post helps to resolve your issue, click the Mark as Answer button at the top of this message.

    Ronnie Vernon
    Microsoft MVP
    Windows Desktop Experience

    Tuesday, November 11, 2008 3:07 AM