Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Error : CommandLineToArgvW is not a member of '`global namespace''

Error : CommandLineToArgvW is not a member of '`global namespace''

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    harshadha
    wrote on last edited by
    #1

    Hai, Iam using this line for getting the commandline argument. The error iam getting is: wchar_t** szArglist = ::CommandLineToArgvW( ::GetCommandLineW(), &numArgs ); error C2039: 'CommandLineToArgvW' : is not a member of '`global namespace'' error C2065: 'CommandLineToArgvW' : undeclared identifier error C2440: 'initializing' : cannot convert from 'int' to 'unsigned short ** ' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast. Can anyone suggest how to rectify this error.. Thanks & Regards, Harshadha

    S 1 Reply Last reply
    0
    • H harshadha

      Hai, Iam using this line for getting the commandline argument. The error iam getting is: wchar_t** szArglist = ::CommandLineToArgvW( ::GetCommandLineW(), &numArgs ); error C2039: 'CommandLineToArgvW' : is not a member of '`global namespace'' error C2065: 'CommandLineToArgvW' : undeclared identifier error C2440: 'initializing' : cannot convert from 'int' to 'unsigned short ** ' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast. Can anyone suggest how to rectify this error.. Thanks & Regards, Harshadha

      S Offline
      S Offline
      Stephen Hewitt
      wrote on last edited by
      #2

      Add a #include <shellapi.h>

      Steve

      H 1 Reply Last reply
      0
      • S Stephen Hewitt

        Add a #include <shellapi.h>

        Steve

        H Offline
        H Offline
        harshadha
        wrote on last edited by
        #3

        Hai Steve, I have included the needed header files and Lib file(Shell32.lib).Actually my code is working in VC++ but the same code is not working in EVC. Thanks For Spending Your Precious Time by Replying... Thanks & Regards Harshadha.

        P 1 Reply Last reply
        0
        • H harshadha

          Hai Steve, I have included the needed header files and Lib file(Shell32.lib).Actually my code is working in VC++ but the same code is not working in EVC. Thanks For Spending Your Precious Time by Replying... Thanks & Regards Harshadha.

          P Offline
          P Offline
          prasad_som
          wrote on last edited by
          #4

          harshadha wrote:

          but the same code is not working in EVC.

          Its no supported on that platform.

          Prasad Notifier using ATL | Operator new[],delete[][^]

          H 1 Reply Last reply
          0
          • P prasad_som

            harshadha wrote:

            but the same code is not working in EVC.

            Its no supported on that platform.

            Prasad Notifier using ATL | Operator new[],delete[][^]

            H Offline
            H Offline
            harshadha
            wrote on last edited by
            #5

            Hai, Do you have any idea how to use that in EVC Thanks Harshadha

            P 1 Reply Last reply
            0
            • H harshadha

              Hai, Do you have any idea how to use that in EVC Thanks Harshadha

              P Offline
              P Offline
              prasad_som
              wrote on last edited by
              #6

              harshadha wrote:

              Do you have any idea how to use that in EVC

              No. Possibly, you can get help from mobile development[^] forum.

              Prasad Notifier using ATL | Operator new[],delete[][^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups