c++ - Connecting to Mobile Network via Mobile Broadband API -


i trying connect mobile network via modem , sim card. every time try set apn string , user credentials in context via setprovisionedcontext() e_invalidarg hresult. parameters used instance of mbn_context, wchar_t* in form of &std::vector<wchar_t>[0], , ulong*.

    mbn_context context;      std::vector<wchar> apnvector;     inparamapn.getcstring(apnvector);      std::vector<wchar> usernamevec;     inparamusername.getcstring(usernamevec);      std::vector<wchar> passwordvector;     inparampassword.getcstring(passwordvector);      context.contextid = mbn_context_id_append;     context.contexttype = mbn_context_type_internet;     context.accessstring = &apnvector[0];     context.username = &usernamevec[0];     context.password = &passwordvector[0];     context.compression = mbn_compression_none;     context.authtype = mbn_auth_protocol_pap; 

and later when have imbnconnectioncontext:

    std::vector<wchar> providervector;     inparamprovider.getcstring(providervector);     ulong requestid;     contextinterface->setprovisionedcontext(context, &providervector[0], &requestid); 

so question is: parameter winapi have problem with, , how can fix it?

also tips of additional sources information appriciated. have far official msdn , code example contained in windows 7 sdk. there further sources of information not aware of? google search didn't yield hoped results.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -