CInternetSession could not run in a message loop?
-
I use a pointer of CInternetSession in a function. When I use the function by button, all things are ok. When I use it in a OnCommunication message function which recieves message from other device, there is a error 12006. The source code is like that: pIneternetSession->OpenURL(strUrl); I am sure the strUrl is right. Why?
-
I use a pointer of CInternetSession in a function. When I use the function by button, all things are ok. When I use it in a OnCommunication message function which recieves message from other device, there is a error 12006. The source code is like that: pIneternetSession->OpenURL(strUrl); I am sure the strUrl is right. Why?
can you print out and check what exactly strUrl Contains, i did a google and got 12006 INTERNET_UNRECOGNIZED_SCHEME I am not sure though if its the rite error code meaning.
-Prakash
-
can you print out and check what exactly strUrl Contains, i did a google and got 12006 INTERNET_UNRECOGNIZED_SCHEME I am not sure though if its the rite error code meaning.
-Prakash
strUrl is 'http://www.sina.com.cn/'
-
strUrl is 'http://www.sina.com.cn/'
OpenURL throws a CInternetException exception, can you catch and figure out what exactly is the error.
-Prakash
-
OpenURL throws a CInternetException exception, can you catch and figure out what exactly is the error.
-Prakash
I put a button on the dialog. After input the url into a textbox, push the button. Then the application will visit the web and download the webpage by OpenURL() function. Until now all things are good. Then I use a event to replace the button. The event will be call by a RS232 input message. I use the same function to visit the web. Now there is a error CInternetException 12006. I see the error code from dgbView and the debug version.
-
I put a button on the dialog. After input the url into a textbox, push the button. Then the application will visit the web and download the webpage by OpenURL() function. Until now all things are good. Then I use a event to replace the button. The event will be call by a RS232 input message. I use the same function to visit the web. Now there is a error CInternetException 12006. I see the error code from dgbView and the debug version.
sorry it is difficult to diagonose the problem without understanding what those error code is. if you have not solved the problem yet, i would suggest you to post a event (a user defined probably or WM_COMMAND that you were using before) and then call that api. I am not sure, but may be it is conflicting with the data processing event call. btw, are you calling the OpenURL from the same window that you were doing before?
-Prakash
-
sorry it is difficult to diagonose the problem without understanding what those error code is. if you have not solved the problem yet, i would suggest you to post a event (a user defined probably or WM_COMMAND that you were using before) and then call that api. I am not sure, but may be it is conflicting with the data processing event call. btw, are you calling the OpenURL from the same window that you were doing before?
-Prakash
-
sorry it is difficult to diagonose the problem without understanding what those error code is. if you have not solved the problem yet, i would suggest you to post a event (a user defined probably or WM_COMMAND that you were using before) and then call that api. I am not sure, but may be it is conflicting with the data processing event call. btw, are you calling the OpenURL from the same window that you were doing before?
-Prakash
-
sorry it is difficult to diagonose the problem without understanding what those error code is. if you have not solved the problem yet, i would suggest you to post a event (a user defined probably or WM_COMMAND that you were using before) and then call that api. I am not sure, but may be it is conflicting with the data processing event call. btw, are you calling the OpenURL from the same window that you were doing before?
-Prakash
-
rushing wrote:
I found the reason is that there is a space ' ' before the URL.
didnt I tell u that there could be some problem with the url ;), good that you identified. I had a similar problem long back where a space in the parameter was causing a problem and it was resolved only after weeks of debuging.:omg:
-Prakash
-
rushing wrote:
I found the reason is that there is a space ' ' before the URL.
didnt I tell u that there could be some problem with the url ;), good that you identified. I had a similar problem long back where a space in the parameter was causing a problem and it was resolved only after weeks of debuging.:omg:
-Prakash
-
rushing wrote:
I am lucky to meet you.
:->, there are many more smarter ppl than me here in code-project, you would be even more luckier if you meet them too ;)
-Prakash