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. How to convert char * to LPWSTR ??

How to convert char * to LPWSTR ??

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
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.
  • A Offline
    A Offline
    adara
    wrote on last edited by
    #1

    How to convert char * to LPWSTR for func. NetWkstaUserEnum??

    L T C 4 Replies Last reply
    0
    • A adara

      How to convert char * to LPWSTR for func. NetWkstaUserEnum??

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Try MultiByteToWideChar function regards

      1 Reply Last reply
      0
      • A adara

        How to convert char * to LPWSTR for func. NetWkstaUserEnum??

        T Offline
        T Offline
        Tim Smith
        wrote on last edited by
        #3

        If you have ATL installed, take a look at AtlA2WHelper. Tim Smith Descartes Systems Sciences, Inc.

        1 Reply Last reply
        0
        • A adara

          How to convert char * to LPWSTR for func. NetWkstaUserEnum??

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          If you're using MFC, you can use CString to do it, just call AllocSysString. Either way, you can cast to _bstr_t in order to do this conversion. Just #include <comdef.h> Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.

          1 Reply Last reply
          0
          • A adara

            How to convert char * to LPWSTR for func. NetWkstaUserEnum??

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            search for "String Conversion Macros" in MSDN or locate in Visual C++/Reference/ATL/Reference

            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