I am trying to create an AdHoc connection, and for this I am using the AdHoc wifi interface provided by Microsoft. I wrote the code: -
IDot11AdHocManager *pIAdHocMng = NULL ; HRESULT hr = CoInitialize(NULL); hr = CoCreateInstance(CLSID_Dot11AdHocManager,NULL,CLSCTX_INPROC_HANDLER ,IID_IDot11AdHocManager ,(void**)pIAdHocMng); if(hr == S_OK) printf("CreateNetwork Method success due to following reason :\n %ld",hr) ; else printf("CreateNetwork Method fail due to following reason : %ld \n ",hr) ; getch(); CoUninitialize();
But it will not return the Dot11AdHocManager link, it will return an error and a NULL value, please help me get a link to the Dot11AdHocManager interface, so I can use its method, which will help me create the AdHoc Network
source share