PDA

View Full Version : working with Windows Media Format 11 SDK



Baasie
5th January 2010, 10:48
Good day fellow qt'ers.

Atm i am working on a project on a windows system wich needs to connect and work with a MTP device. I searched the web for some info and finnaly found something reliable. They tell me to use and include Windows Media Format 11 SDK.

But here is the thing, i am struggeling to get it work, since the example is in vs i cannot seem to swtich it into my QT project.

source: http://opensource.creative.com/mtp_xfer.html


MTP File Transfer on Windows

Introduction:
This brief tutorial will detail how to get and install the headers and libraries needed to to MTP programming on Windows, and will lead you through a simple example which shows how to transfer a file to an MTP device. Getting this tutorial code to compile and run is not dependent on getting the Microsoft SDK's code to compile and run -- we just borrow the SDK's headers and one library.

Instructions:
1) Download the Windows Media Format 9.5 SDK, which includes the Windows Media Device Manager 10 SDK. The SDK should be available at http://msdn.microsoft.com/windowsmedia/downloads/default.aspx (wmformat95sdk.exe).

2) Install the SDK.

3) Add the new lib and include directories (by default, c:\wmsdk\wmfsdk95\include, c:\wmsdk\wmfsdk95\wmdm\inc, c:\wmsdk\wmfsdk95\lib, and c:\wmsdk\wmfsdk95\wmdm\lib) into your IDE. For VS2005, this is done by selecting the panel at Tools..Options..Projects&Solutions..VC++ Directories. Other Microsoft development environments are similar.

4) Create a new 32-bit C++ command-line application template and test to make sure it compiles and links properly.

5) Replace the template code with this code.

6) Download the test file testfile.mp3 and place it in c:\music\ (or change the code to match where you put it).

7) Add the library "mssachlp.lib" to the debug and release build linker input library settings.

8) Build the revised project and run it.

Depending on what devices are available on your system, you should now be able to enumerate and see the properties of various media devices on your system, including connected Creative media devices.

Notes:

The file wmdm.chm (default location c:\wmsdk\wmfsdk95\docs\wmdm.chm) is the help file -- very useful.

If you are running 64-bit Windows, the Windows Media Format 9.5 SDK installer isn't going to run. You can probably extract the contents of the SDK manually if necessary, but if you have a 32-bit installation available, use that and then transfer the files over manually to your 64-bit machine.

on a side note, i tried using 9.5 but this didn't seem to work either.

this is wha ti tried puttin in my .pro file:


INCLUDEPATH += C:/WMSDK/WMFSDK11/include \
C:/WMSDK/WMFSDK11/WMDM/inc \
C:/WMSDK/WMFSDK11/WMDM/lib \
C:/WMSDK/WMFSDK11/lib
LIBS += C:/WMSDK/WMFSDK11/WMDM/lib -lmssachlp

so can anyone help me out so that the example code will work...??

it won't want to see #include "mswmdm_i.c" for instance and gives loads of errors wwhen i compile the example code.

thanx in advance.

Baasie

www.qtcentre.org
10th March 2011, 13:45
Hey Baasie,

You just have to add the wmvcore.lib file in the Header Files.
Add>>Existing Item>>change it to All Files
Just look for it under the <Drive>\<Program Files>\WMFSDK11\lib\.

Hope this works. If doesn't just let me know.

Thanks,
Tan http://haluskein.tk