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. ATL / WTL / STL
  4. Base64Encode

Base64Encode

Scheduled Pinned Locked Moved ATL / WTL / STL
sysadmintutorialc++helpquestion
2 Posts 2 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.
  • G Offline
    G Offline
    gyzmau
    wrote on last edited by
    #1

    Hi I'm using ATL just for one function. Base64Encode. I don't make server or network i want juste Encode a string. I try to make it with an example from CodeProject: CString sSource = "ToEncode"; int nDestLen = Base64EncodeGetRequiredLength(sSource.GetLength()); CString str64; Base64Encode((const BYTE*)(LPCSTR)sSource, sSource.GetLength(), str64.GetBuffer(nDestLen), &nDestLen); str64.ReleaseBuffer(nDestLen); cout<<(LPCSTR)str64; It said me Cannot convert CString to LPCSTR one first argument of Base64Encode. I'm working under VS2005. It's the right way to do what i want? Is there a better way, maybe something else than ATL? How to correct this error? Thanks for your answer. Sorry for my poor english i'm not an english-speaking

    S 1 Reply Last reply
    0
    • G gyzmau

      Hi I'm using ATL just for one function. Base64Encode. I don't make server or network i want juste Encode a string. I try to make it with an example from CodeProject: CString sSource = "ToEncode"; int nDestLen = Base64EncodeGetRequiredLength(sSource.GetLength()); CString str64; Base64Encode((const BYTE*)(LPCSTR)sSource, sSource.GetLength(), str64.GetBuffer(nDestLen), &nDestLen); str64.ReleaseBuffer(nDestLen); cout<<(LPCSTR)str64; It said me Cannot convert CString to LPCSTR one first argument of Base64Encode. I'm working under VS2005. It's the right way to do what i want? Is there a better way, maybe something else than ATL? How to correct this error? Thanks for your answer. Sorry for my poor english i'm not an english-speaking

      S Offline
      S Offline
      SilentSilent
      wrote on last edited by
      #2

      gyzmau wrote:

      Is there a better way, maybe something else than ATL?

      You can find many places with Base64 code on the internet, e.g. http://www.ruffboy.com/download.htm[^]

      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