c++ - How to determine if my program is 'on the company domain' -


i'm trying determine if service connected company domain or not.

i tried

bool bresult = logonuser(m_username, m_domainstr, m_password, logon32_logon_network, logon32_provider_default, &userhandle); 

but returns true if credentials good.

i'm guessing windows checking cached credentials , determining good.

i suppose use ping, firewall stop too.

is there nice, clean way determine if computer on 'corporate network' (e.g. can connect ad).

check availability of dcs sysvol share.

i query dns list of dcs, loop through dcs until can access share. if can, i'm online. if can't, i'm offline.

if on company lan, dcs unavailable, might offline...


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -