when i use classic httprequest and response with try and catch, it works, i can make infinite loop with while(true) and with Thread::Sleep(10000) refresh this statuscode every 10 seconds if some webpage is down or some error appear. but when i use my function(its same with try catch but have return values to String^), then my loop go only one time and stuch on second run on line with first function. (first run is done correctly, but second never appear). Where in function i have problem please ? :/
if statuscode isn't OK, then httpwebresponse throw an exception and i catch this with try/catch (it works, i try it, if i dont make try catch, then program throw error and crash if code is not 200). i can use timer(first i must check how it works), but still dont know, why my function stuck on second run and when i use same code (but change return to dp->val1 for example), then it works like a charm.