Comments inline:
I'm writing a ASP.net webservice wich will visualize an image, generated
by another application.
Visualize? A web service can return serialized data, that is, data in the
form of text. In order to "visualize" it (I will assume here that you mean
to "display") it, it would, after being returned from a Web Service, need to
be de-serialized into an image, and then displayed by the client app. So,
this part is a bit confusing.
The generated image is a char*. I can transform this to a String*, but I
want to view it as an image in my browser.
A generated image that is a pointer to type char? That isn't very helpful.
Basically, the "generated image" could be anything. The char data type in C
is the same as a byte in size, and can therefore be cast as almost anything.
Casting it as a pointer to a String would not be (necessarily) helpful
either. And again, as a Web Service, the only thing a browser will see is
XML text, not an image.
An image is not an array of char. You need to know what exactly the app is
returning if you want to make use of it. On the other hand, you could
probably write your own .Net image generator. All of the classes are there,
ready for you to use. And you would know what your app is putting out, which
is essential to working with it.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living