bored_womble Posted October 27, 2005 Posted October 27, 2005 Hi,I am new to the boards and have spent alot of time searching the web for an answer, with limited success in converting code from C# to C++.I have most of the material I need however one problem still persists and this seemed to be an appropriate place to ask for help.I have the following C# codepublic void TransitionalState( object ResponseBlob, IWMSContext pUserCtx, IWMSContext pPresentationCtx, IWMSCommandContext pCommandContext, IWMSAuthenticationCallback pCallback, object Context){ string AUTH_QOP = "Instance"; string AUTH_REALM = "REALM"; Encoding Enc = Encoding.Unicode; string strNonce = GenerateNonce(); byte[] Response; byte[] Challenge = Enc.GetBytes(""); try { Response = (byte[])ResponseBlob; if( Response.Length == 0 ) { // The client requested authentication; prepare the // challenge response to send to the client. Challenge = Enc.GetBytes("realm=\"" + AUTH_REALM + "\",qop=\"" + AUTH_QOP + "\",nonce=\"" + strNonce + "\",charset=utf-8,algorithm=MD5-sess"); m_Result = WMS_AUTHENTICATION_RESULT.WMS_AUTHENTICATION_CONTINUE; }Which is basically a setup for request authentication from a Windows Media Plugin, and works as expected in C#, however I need to convert it to C++, the main issue I have is the VARIENT in C++ which I am failing to be able to fill with the string ( Challenge ) required.Any Takers ?Appologies if these appears something rather basic, however my C++ experience is relatively new, but I would like to understand some of the construct difference between the two ...BW
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now