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

javascript - addthis share facebook and google+ url -

java - Simulate the tossing of a coin three times and print out the percentage of cases in which one gets three tails -

c++ - Class declaration error at explicit keyword -