Windows Media Player
-
Hi I am using VS 2003 with the latest windoze media player. I want to hide a video in a dll. Then I want the media player to access it. How do I do that? Thanks! Antoine This by our hands that dream, "I shall find a way or make one!"
-
Hi I am using VS 2003 with the latest windoze media player. I want to hide a video in a dll. Then I want the media player to access it. How do I do that? Thanks! Antoine This by our hands that dream, "I shall find a way or make one!"
You can't, not without implementing your own native pluggable protocol handler for windows (like that which handles http(s), ms-help, its, res, etc.). Windows Media Player uses monikers to bind to streams and there is not - at this time - a plugglable protocol handler for streaming embedded resources. Also, embedded a video in an assembly is extremely wasteful. You'll increase the load times of the assembly incredibly. Just distribute it as a separate file and point the URL property of WMP to the file when you need to play it.
Microsoft MVP, Visual C# My Articles
-
You can't, not without implementing your own native pluggable protocol handler for windows (like that which handles http(s), ms-help, its, res, etc.). Windows Media Player uses monikers to bind to streams and there is not - at this time - a plugglable protocol handler for streaming embedded resources. Also, embedded a video in an assembly is extremely wasteful. You'll increase the load times of the assembly incredibly. Just distribute it as a separate file and point the URL property of WMP to the file when you need to play it.
Microsoft MVP, Visual C# My Articles
Yeah, OK. thanks for the answer. didn't thought about the loss of loading time. Do you know of a way to keep the videos secure? Digital Rights Managment seems a way to go -is it??? ;) Cheers Antoine This by our hands that dream, "I shall find a way or make one!"
-
Yeah, OK. thanks for the answer. didn't thought about the loss of loading time. Do you know of a way to keep the videos secure? Digital Rights Managment seems a way to go -is it??? ;) Cheers Antoine This by our hands that dream, "I shall find a way or make one!"
Yes, DRM would be something to look into. Beside, if you think storing the file as an embedded resource (or even in the
.rsrc
section of the PE/COFF executable itself) would keep it secure, you'd be sorely surprised. ildasm.exe, for example, can easily extract anything in an assembly. One could throw together a simple .NET app to do this as well. Resources in native DLLs can easily be extracted, too (though writing the code for it is a big harder, but plenty of apps - including Visual Studio - can make quick and easy work of that by just loading the .rsrc section and providing extraction capabilities). If you did want to embed it stil, you'd have to extract it anyway in order for WMP to play it. At that point someone could also mess with it. DRM is really about your only protection, if it is really that necessary.Microsoft MVP, Visual C# My Articles
-
Yes, DRM would be something to look into. Beside, if you think storing the file as an embedded resource (or even in the
.rsrc
section of the PE/COFF executable itself) would keep it secure, you'd be sorely surprised. ildasm.exe, for example, can easily extract anything in an assembly. One could throw together a simple .NET app to do this as well. Resources in native DLLs can easily be extracted, too (though writing the code for it is a big harder, but plenty of apps - including Visual Studio - can make quick and easy work of that by just loading the .rsrc section and providing extraction capabilities). If you did want to embed it stil, you'd have to extract it anyway in order for WMP to play it. At that point someone could also mess with it. DRM is really about your only protection, if it is really that necessary.Microsoft MVP, Visual C# My Articles
Thanks for the input! Ok So the request forms are all sent out. I just I wont need to shell out money by the windows. :) Cheers Antoine This by our hands that dream, "I shall find a way or make one!"
-
Hi I am using VS 2003 with the latest windoze media player. I want to hide a video in a dll. Then I want the media player to access it. How do I do that? Thanks! Antoine This by our hands that dream, "I shall find a way or make one!"
Lookup MSDN and Google with "res://"