Using Silverlight without knowing about it?
I know nothing about Silverlight or any type of scripting, and don't have time to learn about it. I have a Visual C++ client application that needs a change to access a Silverlight server (I guess you'd call it?) I've been given a snippet of HTML that I need to post to the server I think. I don't want to add any new dependencies to my C++ product. So, how do I post this stuff to the SilverLight web page and get it to show开发者_C百科 up in a browser, from my C++ app? (I can use ShellExecute to kick off IE on a local file, or use IWebBrowser, but don't want to add other dependencies.)
Please, if you find this question nonsensical, just don't answer.
First you need to understand silverlight.
Silverlight is a client-side technology (not a server). It communicates to a server in multiple ways.
So here is what you want to do.
- send stuff from your c++ project to a web server.
- have server send it to a client (in this case your browser).
How do you do this?
- Expose a webservice from your server, a wcf service may suffice. Have your c++ application call the expose method and send the data to it.
- Create a web project that will get the data from the repository (where ever your wcf service saved the data to, a database, file etc.) and display it in html.
You dont need silverlight in this case. It will only come in handy to display.
PS. If you NEED to use silverlight, you need to use COM. Google for 'silverlight COM integration'.
精彩评论