MSVC 2012/ 2010

Home Forums Discussions Support Portal MSVC 2012/ 2010

This topic contains 2 replies, has 2 voices, and was last updated by  Vadim Smirnov 3 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5395

    vampie
    Participant

    Hello,

    I am trying to compile sample application and it gives me the following

    c:projectsqtwebserver_urlcontent_filterndisapi.h(34) : error C2440: ‘default argument’ : cannot convert from ‘const char [7]’ to ‘const TCHAR *’

    // COMPILE PARAMETERS:
    cl -c -nologo -Zm200 -Zc:wchar_t -O2 -MD -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_CORE_LIB -DNDEBUG -I”……WinpkFilterkernelbindlli386″ -I”……QtQt5.1.05.1.0msvc2012_64include” -I”……QtQt5.1.05.1.0msvc2012_64includeQtCore” -I”release” -I”……QtQt5.1.05.1.0msvc2012_64mkspecswin32-msvc2012″ -Forelease @C:UsersADMINI~1AppDataLocalTempStdAfx.obj.8032.16.jom
    StdAfx.cpp

    // ERROR PART

    // This class is exported from the ndisapi.dll
    class NDISAPI_API CNdisApi
    {
    public:
    CNdisApi (const TCHAR* pszFileName = _T(DRIVER_NAME_A));
    //CNdisApi (const TCHAR* pszFileName = (DRIVER_NAME_A);
    virtual ~CNdisApi ();

    How can fix this ndisapi.h?

    #7151

    vampie
    Participant

    //CNdisApi (const TCHAR* pszFileName = _T(DRIVER_NAME_A));
    CNdisApi (const TCHAR* pszFileName = L”NDISRD”);

    I have changed the above lines now I am getting:

    main.obj : error LNK2019: unresolved external symbol “__declspec(dllimport) public: __thiscall CNdisApi::CNdisApi(unsigned short const *)” (__imp_??0CNdisApi@@QAE@PBG@Z) referenced in function _main

    Any idea?

    #7152

    Vadim Smirnov
    Moderator

    The problem caused by -DUNICODE compiler switch. If you want your project to use UNICODE then you have to recompile ndisapi.dll as UNICODE either. For backward compatibility with earlier versions of Windows ndisapi.dll distributed within WinpkFilter package is built as multibyte.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.