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 ne开发者_开发百科ed 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.
CredUIPromptForCredentials() (or one of its variants) is probably what you're looking for. This provides a consistent look and feel with the version of Windows your software is running on.
精彩评论