views:

27

answers:

1

Hi,

I'm using WinHTTP to write an an app that needs access to the internet, and is potentially behind a proxy. Everything works (almost) out of the box is the user is on a domain, but if he or she isn't then I need a way to ask for credentials. Is there a standard way of doing that, or should I write my own dialog?

Ideally I'd like something that mimics IE's username/password dialog.

Thanks.

+1  A: 

CredUIPromptForCredentials() (or one of it's variants) is probably what you're looking for. This provides consistent look and feel with the version of Windows your software is running on.

Bukes
Actually I need to call `CredUIPromptForWindowsCredentials` to get the Vista look. Thanks.
Pedro d'Aquino