Microsoft SSPI example
-
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!! -
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!!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!!