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. cannot convert parameter 4 from 'wchar_t *' to 'char []'

cannot convert parameter 4 from 'wchar_t *' to 'char []'

Scheduled Pinned Locked Moved C / C++ / MFC
5 Posts 4 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.
  • P Offline
    P Offline
    PankajB
    wrote on last edited by
    #1

    Hi There. I am using VS2008, and am facing above problem. Just FYI, I am calling WmCpyDta_GetMessage_sTagData() function as below...

    WmCpyDta_GetMessage_sTagData(NULL, NULL, lParam, strTag.GetBuffer(0), strData.GetBuffer(0));

    Signature of above function is...

    BOOL WmCpyDta_GetMessage_sTagData(HWND hAcceptFrom, HWND hIdOfSender, const LPARAM lMsgStructure,
    char szTag[], char szData[]);

    Please suggest. Thanks PanB

    L S C 3 Replies Last reply
    0
    • P PankajB

      Hi There. I am using VS2008, and am facing above problem. Just FYI, I am calling WmCpyDta_GetMessage_sTagData() function as below...

      WmCpyDta_GetMessage_sTagData(NULL, NULL, lParam, strTag.GetBuffer(0), strData.GetBuffer(0));

      Signature of above function is...

      BOOL WmCpyDta_GetMessage_sTagData(HWND hAcceptFrom, HWND hIdOfSender, const LPARAM lMsgStructure,
      char szTag[], char szData[]);

      Please suggest. Thanks PanB

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      wchar_t is not equal to char, hopefully you know that. If you don't nothing I say here is going to help you. So the next thing you do is this[^]

      1 Reply Last reply
      0
      • P PankajB

        Hi There. I am using VS2008, and am facing above problem. Just FYI, I am calling WmCpyDta_GetMessage_sTagData() function as below...

        WmCpyDta_GetMessage_sTagData(NULL, NULL, lParam, strTag.GetBuffer(0), strData.GetBuffer(0));

        Signature of above function is...

        BOOL WmCpyDta_GetMessage_sTagData(HWND hAcceptFrom, HWND hIdOfSender, const LPARAM lMsgStructure,
        char szTag[], char szData[]);

        Please suggest. Thanks PanB

        S Offline
        S Offline
        Stuart Dootson
        wrote on last edited by
        #3

        The obvious implication of the error message is that strTag is a wide string (I suspect strData will be as well). You'll probably be wanting to look at a function to convert wide strings to ASCII ones[^]...

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        P 1 Reply Last reply
        0
        • S Stuart Dootson

          The obvious implication of the error message is that strTag is a wide string (I suspect strData will be as well). You'll probably be wanting to look at a function to convert wide strings to ASCII ones[^]...

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

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

          Simply Great !!! Thanks Buddy.

          1 Reply Last reply
          0
          • P PankajB

            Hi There. I am using VS2008, and am facing above problem. Just FYI, I am calling WmCpyDta_GetMessage_sTagData() function as below...

            WmCpyDta_GetMessage_sTagData(NULL, NULL, lParam, strTag.GetBuffer(0), strData.GetBuffer(0));

            Signature of above function is...

            BOOL WmCpyDta_GetMessage_sTagData(HWND hAcceptFrom, HWND hIdOfSender, const LPARAM lMsgStructure,
            char szTag[], char szData[]);

            Please suggest. Thanks PanB

            C Offline
            C Offline
            CPallini
            wrote on last edited by
            #5

            You should really avoid pickpockets and CString::GetBuffer (unless, for the latter, you've a special licence from Mark Salsbery). :-D

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            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