[PATCH 3/4] mpr: Implement WNetCancelConnection2W().

Nikolay Sivov bunglehead at gmail.com
Thu Jul 28 03:08:31 CDT 2016


On 27.07.2016 16:16, Pierre Schweitzer wrote:
> 


>  DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce )
>  {
> -    FIXME( "(%s, %08X, %d), stub\n", debugstr_w(lpName), dwFlags, fForce );

I think it's better to keep this as TRACE, also maybe change lpName ->
name, dwFlags -> flags, fForce -> force. Flags are unused, so maybe some
fixme message for them is appropriate.

> +    DWORD ret = WN_NO_NETWORK;
> +    DWORD index;
>  
> -    return WN_SUCCESS;
> +    if (providerTable != NULL)
> +    {
> +        for (index = 0; index < providerTable->numProviders; index++)
> +        {
> +            if(providerTable->table[index].getCaps(WNNC_CONNECTION) &
> +                WNNC_CON_GETCONNECTIONS)

Shouldn't this be WNNC_CON_CANCELCONNECTION?

> +            {
> +                if (providerTable->table[index].cancelConnection)
> +                    ret = providerTable->table[index].cancelConnection((LPWSTR)lpName, fForce);
> +                else
> +                    ret = WN_NO_NETWORK;
> +                if (ret == WN_SUCCESS || ret == WN_OPEN_FILES)
> +                    break;
> +            }

According to docs, WN_OPEN_FILES happens when force == FALSE, does it
make sense to handle it only in this case? Of course we have no easy way
to test any of that.

> +        }
> +    }
> +    return ret;
>  }





More information about the wine-devel mailing list