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. Managed C++/CLI
  4. Microsoft SSPI example

Microsoft SSPI example

Scheduled Pinned Locked Moved Managed C++/CLI
csharpvisual-studiohelptutorialc++
2 Posts 1 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.
  • W Offline
    W Offline
    Wolfram Steinke
    wrote on last edited by
    #1

    In recent days I have been investigating SSPI for a C# .NET remoting app that I have do for work. I came across the Microsoft sample SSPI dll which written in C++. Has anyone sucessfully built it using Visual Studio 2005? If so how? I keep getting a build error and can't find any reference on how to fix it either by casting or using a different API. It does build with VS 2003. The error is as follows error C2440: '=' : cannot convert from '__const_Char_ptr' to 'wchar_t __pin *' in pwszServerPrincipalName = PtrToStringChars(serverPrincipalName); where: wchar_t __pin* pwszServerPrincipalName = NULL; and serverPrincipalName is a String * passed into the ClientContext(...) method. Otherwise if someone could point me in the right direction I would be most grateful. I need to perform a simple authentication of the client which includes licence check, hence the need for custom authentication. Thanking you advance. Happy programming!!

    W 1 Reply Last reply
    0
    • W Wolfram Steinke

      In recent days I have been investigating SSPI for a C# .NET remoting app that I have do for work. I came across the Microsoft sample SSPI dll which written in C++. Has anyone sucessfully built it using Visual Studio 2005? If so how? I keep getting a build error and can't find any reference on how to fix it either by casting or using a different API. It does build with VS 2003. The error is as follows error C2440: '=' : cannot convert from '__const_Char_ptr' to 'wchar_t __pin *' in pwszServerPrincipalName = PtrToStringChars(serverPrincipalName); where: wchar_t __pin* pwszServerPrincipalName = NULL; and serverPrincipalName is a String * passed into the ClientContext(...) method. Otherwise if someone could point me in the right direction I would be most grateful. I need to perform a simple authentication of the client which includes licence check, hence the need for custom authentication. Thanking you advance. Happy programming!!

      W Offline
      W Offline
      Wolfram Steinke
      wrote on last edited by
      #2

      Isn't always the way? You ask a question because you're at a loss at what to do and within the hour or so you are made to feel real small cause you find the answer.. "why didn't I look in that place in the first instance you think." Anyway the answer is here http://support.microsoft.com/default.aspx?scid=kb;EN-US;311259 Happy programming!!

      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