Java calls Windows Media Player through OLE, and some control properties call methods

Source: Internet
Author: User
Tags ole

In fact, Java is not good at doing this kind of development and research, especially the media is the weakness of Java. But for the project, only a lunatic.

Initially found a feasible call class on the network, and there is a call instance, I believe that experience has been downloaded, the filename is called WMP. But this is not enough to meet the functional requirements of the project that I am doing now, which lacks many of the spatial attribute methods of official documents, including what I need.

The first solution is to look for the network upload, hoping to find the complete class package, but the related resources are everyone fired to fry, all the same, did not bring any help, long-time to give up without fruit.

Then there are some code that sees C + + calling Windows Media Player, and it feels like C + + is a convenient way to develop a language that does what I need by invoking a DLL file that has been written in a C + + calling function, which is also called the Jacob Method. Jacob is an abbreviation for Java-com Bridge and can also be used to invoke DLLs. The underlying is also implemented using JNI, which also has a flat
The station dependency. The control call is quite convenient, can call COM and active, can be done in a few minutes, it is downloaded after a DLL and a jar package to put the DLL under the win_home/system32/can both, put the jar package under the classpath of the project. So I'm going to ask a C + + seniors to help me encapsulate a workable DLL.

In the process, I was learning about the specific Jacob technology and thinking about new ways to solve it. Finally I decided to write my own calling method. After careful study of the Code and the information on the Microsoft Official Web site after the successful writing of the call method, this feeling feel times!!!

I will upload the code resources to the CSDN download area, the need for friends can go to download!!!

http://download.csdn.net/detail/raohenglena/7795175

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.