Click here to Skip to main content
15,897,518 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionRe: Sending events to main window of another process Pin
led mike21-May-09 5:48
led mike21-May-09 5:48 
AnswerRe: Sending events to main window of another process Pin
parth_patel21-May-09 6:05
parth_patel21-May-09 6:05 
GeneralRe: Sending events to main window of another process Pin
led mike21-May-09 7:50
led mike21-May-09 7:50 
GeneralRe: Sending events to main window of another process Pin
parth_patel21-May-09 10:58
parth_patel21-May-09 10:58 
GeneralRe: Sending events to main window of another process Pin
parth_patel27-May-09 9:23
parth_patel27-May-09 9:23 
AnswerRe: Sending events to main window of another process Pin
Mark Salsbery21-May-09 7:23
Mark Salsbery21-May-09 7:23 
GeneralRe: Sending events to main window of another process Pin
led mike21-May-09 7:50
led mike21-May-09 7:50 
QuestionProblem getting exact response through webrequest Pin
naveen_bij18-May-09 21:54
naveen_bij18-May-09 21:54 
I have a situation where in i need to send the username and the password to a website and get the confirmation back from the website. Website takes the request in the form of query string.<b> The problem is when i send the request i am not getting the exact response, instead somtimes i get the html code of the website with the response or sometimes i get the url with response. below is the code, can someone please help me with this

mId is the username and mPwd is the password

try
{
String^ lcUrl = "http://login.somewebsite.com/Authorization/";
lcUrl = lcUrl +  mId + "/" + mPwd;
HttpWebRequest^ loHttp = (HttpWebRequest^) WebRequest::Create(lcUrl);
// *** Send any POST data
String^ lcPostData = mId + "/" + mPwd;
loHttp-&gt;Method="POST";
loHttp-&gt;Credentials = CredentialCache::DefaultCredentials;
loHttp-&gt;ContentType = "application/x-www-form-urlencoded";
array&lt;Byte,1&gt;^ lbPostBuffer = gcnew array&lt;Byte,1&gt;(lcPostData-&gt;Length);
lbPostBuffer = System::Text::Encoding::UTF8-&gt;GetBytes(lcPostData);
loHttp-&gt;ContentLength = lcPostData-&gt;Length;
Stream^ loPostData = loHttp-&gt;GetRequestStream();				
loPostData-&gt;Write(lbPostBuffer,0,lbPostBuffer-&gt;Length);
loPostData-&gt;Close();
HttpWebResponse^ loWebResponse = dynamic_cast&lt;HttpWebResponse^&gt; (loHttp-&gt;GetResponse());
Encoding^ enc = System::Text::Encoding::GetEncoding(1252);
StreamReader^ loResponseStream = gcnew StreamReader(loWebResponse-&amp;gt;GetResponseStream(),enc);
lcHtml = loResponseStream-&gt;ReadToEnd();				
loWebResponse-&gt;Close();
loResponseStream-&gt;Close();
MessageBox::Show(lcHtml,"Confirmation",MessageBoxButtons::OK);
}
catch(IOException^ exio)
{				MessageBox::Show(exio-&gt;Message,"Error",MessageBoxButtons::OK);
}
catch(WebException^ webEx)
{				 MessageBox::Show(webEx-&gt;Message,"Error",MessageBoxButtons::OK);
}
catch(Exception^ ex)
{				 MessageBox::Show(ex-&gt;Message,"Error",MessageBoxButtons::OK);
}
return lcHtml;


Naveen

QuestionDelegates and Event in VC.Net Pin
savitri18-May-09 19:40
savitri18-May-09 19:40 
AnswerRe: Delegates and Event in VC.Net Pin
led mike19-May-09 5:35
led mike19-May-09 5:35 
QuestionOnline data display Pin
vinod shankar k17-May-09 22:41
vinod shankar k17-May-09 22:41 
AnswerRe: Online data display Pin
N a v a n e e t h18-May-09 1:19
N a v a n e e t h18-May-09 1:19 
QuestionGetting Error message in debuging Pin
deadlyabbas17-May-09 19:14
deadlyabbas17-May-09 19:14 
AnswerRe: Getting Error message in debuging Pin
N a v a n e e t h17-May-09 19:55
N a v a n e e t h17-May-09 19:55 
GeneralRe: Getting Error message in debuging Pin
deadlyabbas18-May-09 3:14
deadlyabbas18-May-09 3:14 
GeneralRe: Getting Error message in debuging Pin
Mark Salsbery18-May-09 5:31
Mark Salsbery18-May-09 5:31 
GeneralRe: Getting Error message in debuging Pin
led mike18-May-09 6:35
led mike18-May-09 6:35 
GeneralRe: Getting Error message in debuging Pin
deadlyabbas18-May-09 23:02
deadlyabbas18-May-09 23:02 
GeneralRe: Getting Error message in debuging Pin
Mark Salsbery19-May-09 6:04
Mark Salsbery19-May-09 6:04 
GeneralRe: Getting Error message in debuging Pin
led mike19-May-09 6:37
led mike19-May-09 6:37 
QuestionDraw Rectangle onto Picture in PictureBox Pin
cherrymotion17-May-09 4:25
cherrymotion17-May-09 4:25 
AnswerRe: Draw Rectangle onto Picture in PictureBox Pin
N a v a n e e t h17-May-09 4:47
N a v a n e e t h17-May-09 4:47 
GeneralRe: Draw Rectangle onto Picture in PictureBox Pin
cherrymotion17-May-09 6:10
cherrymotion17-May-09 6:10 
GeneralRe: Draw Rectangle onto Picture in PictureBox Pin
N a v a n e e t h17-May-09 6:48
N a v a n e e t h17-May-09 6:48 
QuestionReference User32.lib Pin
thenutz7215-May-09 14:16
thenutz7215-May-09 14:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.