I am Trying to create AdHoc connection and for this i am using AdHoc wifi Interface provided by Microsoft. I have written 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 reference of Dot11AdHocManager it will return error and NULL value please help me to get the reference of Dot11AdHocManager Interface so i can use it method which help me to create the AdHoc Network