Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C# .NET Windows Media Player WM_COPYDATA *whimper*

C# .NET Windows Media Player WM_COPYDATA *whimper*

Scheduled Pinned Locked Moved C#
csharpdatabasecomalgorithmscollaboration
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    spamoom
    wrote on last edited by
    #1

    Well, let me get my situation explained. Before I go any further please know I HAVE google'd, so much so that I'm posting on a forum after a few hours of searching :). Sticking to the point, I'm basically trying to aquire the current media info from windows media player and retrieve the value in a .NET application. My apologies for the amount of links. I first found the COM refrence named wmp.dll, after a reasonable amount of time wasted, I realised that it was used for embedding WMP in a form application etc, which isn't what I wanted. Next I hit google, nothing. IRC followed with everyone shrugging, one individual did however suggest I look at a IM plugin source code. After that I found the following file written in what I think looks like C (http://pidgin-musictracker.googlecode.com/svn/trunk/src/wmp.c[^). Reading through the plugin wiki revealed the following page, (http://kentie.net/article/nowplaying/index.htm[^]). I learned that the wmp live messenger plugin sent its data via WM_COPYDATA (still not too sure on how that works :D), following on from that... I then landed on the following link which seemed very promising at first (http://www.codeproject.com/KB/cs/wm_copydata_use.aspx[^]). I downloaded the source & binaries and sure enough the data was 'magically' been sent between programs, I thought to myself.. thats how WMP does it! :) After reading the source, I was stumped... probably due to my lack of knowlage and experience. Could some 'kind' individual(s) aid me in these troubles I am having. Kind Regards Sam

    Richard Andrew x64R 1 Reply Last reply
    0
    • S spamoom

      Well, let me get my situation explained. Before I go any further please know I HAVE google'd, so much so that I'm posting on a forum after a few hours of searching :). Sticking to the point, I'm basically trying to aquire the current media info from windows media player and retrieve the value in a .NET application. My apologies for the amount of links. I first found the COM refrence named wmp.dll, after a reasonable amount of time wasted, I realised that it was used for embedding WMP in a form application etc, which isn't what I wanted. Next I hit google, nothing. IRC followed with everyone shrugging, one individual did however suggest I look at a IM plugin source code. After that I found the following file written in what I think looks like C (http://pidgin-musictracker.googlecode.com/svn/trunk/src/wmp.c[^). Reading through the plugin wiki revealed the following page, (http://kentie.net/article/nowplaying/index.htm[^]). I learned that the wmp live messenger plugin sent its data via WM_COPYDATA (still not too sure on how that works :D), following on from that... I then landed on the following link which seemed very promising at first (http://www.codeproject.com/KB/cs/wm_copydata_use.aspx[^]). I downloaded the source & binaries and sure enough the data was 'magically' been sent between programs, I thought to myself.. thats how WMP does it! :) After reading the source, I was stumped... probably due to my lack of knowlage and experience. Could some 'kind' individual(s) aid me in these troubles I am having. Kind Regards Sam

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      It would help if you kindly stated your exact question so that someone could know how to help you. Are you trying to implement the WM_COPYDATA in your C# program?

      S 1 Reply Last reply
      0
      • Richard Andrew x64R Richard Andrew x64

        It would help if you kindly stated your exact question so that someone could know how to help you. Are you trying to implement the WM_COPYDATA in your C# program?

        S Offline
        S Offline
        spamoom
        wrote on last edited by
        #3

        My apologies :P Yes, I'm trying to impliment WM_COPYDATA into my C# .NET program, however it needs to get the data sent by wmplayer.exe rather than another application that I have written. Thanks

        Richard Andrew x64R 1 Reply Last reply
        0
        • S spamoom

          My apologies :P Yes, I'm trying to impliment WM_COPYDATA into my C# .NET program, however it needs to get the data sent by wmplayer.exe rather than another application that I have written. Thanks

          Richard Andrew x64R Offline
          Richard Andrew x64R Offline
          Richard Andrew x64
          wrote on last edited by
          #4

          Hi, It appears that you have two problems, basically. 1. How to implement the reception of the WM_COPYDATA message in your C# program - this I can help you with 2. How to make Media Player send you the information - this I have no idea. As far as #1, you'll have to create and manage a window for the sole purpose of receiving window messages of which WM_COPYDATA is just one. Look up this topic in MSDN "Subclassing Controls with a Managed Window Procedure". The idea is that you hijack the window procedure for one of your controls, and handle the low-level window messages in your C# program instead of letting the control handle them itself. This is pretty tough stuff, but if you have further questions, I'm sure that I or someone else can answer them.

          S 1 Reply Last reply
          0
          • Richard Andrew x64R Richard Andrew x64

            Hi, It appears that you have two problems, basically. 1. How to implement the reception of the WM_COPYDATA message in your C# program - this I can help you with 2. How to make Media Player send you the information - this I have no idea. As far as #1, you'll have to create and manage a window for the sole purpose of receiving window messages of which WM_COPYDATA is just one. Look up this topic in MSDN "Subclassing Controls with a Managed Window Procedure". The idea is that you hijack the window procedure for one of your controls, and handle the low-level window messages in your C# program instead of letting the control handle them itself. This is pretty tough stuff, but if you have further questions, I'm sure that I or someone else can answer them.

            S Offline
            S Offline
            spamoom
            wrote on last edited by
            #5

            Looks like I'm in luck! I'll take a look at the MSDN topic later on today. Regarding #2, wmp already includes this by default to support windows messenger. Thanks Richard

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups