none
About Adhoc network using APIS in VC++ RRS feed

  • Question


  • Hi, I am trying to use the adhoc VC++ API.

    http://msdn.microsoft.com/en-us/library/ms706573(VS.85).aspx

    Above is the link for that APIs.

    Following is the code i have written.

    I am getting error : that I have copied after the program.

    can anybody help me ??

    It would be great , if you can send me working code.

    Thanks a lot.

    ==========================================================================================================

    #include <iostream>
    #include <adhoc.h>
    #include <stdio.h>
    #include <Ipexport.h>
    #include <conio.h>

    using namespace std;

    int main() {
       
       
        HRESULT Ad_Auth_Result;
        DOT11_ADHOC_AUTH_ALGORITHM *abcd = (DOT11_ADHOC_AUTH_ALGORITHM*)DOT11_ADHOC_AUTH_ALGO_80211_OPEN;
        cout <<"the value of abcd :: " <<abcd;
        _getch();
       
        Ad_Auth_Result = IDot11AdHocSecuritySettings::GetDot11AuthAlgorithm(abcd);

        return 0;
    }

    ============================================================================================================

    1>------ Build started: Project: Adhoc_Magmt, Configuration: Debug Win32 ------
    1>Compiling...
    1>Adhoc_Invoke.cpp
    1>c:\documents and settings\bhavin\my documents\visual studio 2008\projects\adhoc_magmt\adhoc_magmt\adhoc_invoke.cpp(17) : error C2352: 'IDot11AdHocSecuritySettings::GetDot11AuthAlgorithm' : illegal call of non-static member function
    1>        c:\program files\microsoft sdks\windows\v6.0a\include\adhoc.h(1226) : see declaration of 'IDot11AdHocSecuritySettings::GetDot11AuthAlgorithm'
    1>Build log was saved at "file://c:\Documents and Settings\Bhavin\My Documents\Visual Studio 2008\Projects\Adhoc_Magmt\Adhoc_Magmt\Debug\BuildLog.htm"
    1>Adhoc_Magmt - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    • Moved by Tagore BandlamudiModerator Monday, June 8, 2009 12:40 PM Not related to Learning Manager (From:Learning Manager Bugs and Feedback)
    Saturday, June 6, 2009 6:40 AM