I would like to open TMemoryStream which contains XML raw data at my TWebBrowser component? How I can achieve this?
Asked
Active
Viewed 392 times
0
-
Try this http://delphidabbler.com/articles?article=14. – TLama Dec 30 '14 at 12:43
-
It's not working for me. I've used "InternalLoadDocumentFromStream" procedure from that article and it gives me an Access Violation on: if PersistStreamInit.InitNew = S_OK then – vBB Dec 30 '14 at 12:54
-
That's what I don't want to believe. That would mean the `QueryInterface` method fails in its job. – TLama Dec 30 '14 at 13:01
-
I'm pretty sure I used it in right way. I am creating TmemoryStream object inside my TThread class, when thread finished his job I'm passing memorystream to my global variable, and assigning my global variable as a return of my tthread function. Next, I'm calling my tthread function from main form and getting memory stream inside my main form (its size tells me that everything is ok) by assigning function to memorystream variable created inside my main form. Then I'm checking if memstream in my mainform is assigned (it is) and then calling procedure to load stream. And it gives me an error. – vBB Dec 30 '14 at 13:09
-
1Getting access violation on that line would mean the `QueryInterface` call returns `S_OK` but doesn't return a valid `IPersistStreamInit` interface reference. That would be critical error and the world would cease to make sense :) Are you absolutely sure it fails on that line ? – TLama Dec 30 '14 at 13:28
-
When I'm debugging this code and my debugger stops there, and I press F8 it gives me an AV. – vBB Dec 30 '14 at 13:45
-
Did you read the text below `InternalLoadDocumentFromStream` that discusses the *type of stream* that is needed (the third and fourth paragraphs of text below the code block)? It's highly unlikely that the code from that article just *doesn't work*, as it's been around for quite some time. Chances are much greater that you've just not used it properly because you didn't read the article but just tried to use it and did so incorrectly as a result. – Ken White Dec 30 '14 at 22:57