Missing WMCreateWriter in wmvcore.lib  
Author Message
A.M.





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

wmvcore.lib shipped with DirectShow (included in the latest PSDK) doesn't list many functions exported by wmvcore.dll (e.g. WMCreateWriter). Does anybody know the reason for this and where I can obtain wmvcore.lib that matches wmvcore.dll


Audio and Video Development1  
 
 
nobugz





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

WMCreateWriter() is an ActiveX method. ActiveX methods don't get exported from a DLL, you invoke them through a COM class object which is created by DllGetClassObject. Start reading here.




 
 
A.M.





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

Really WMCreateWriter is declared in wmsdkidl.h as
HRESULT STDMETHODCALLTYPE WMCreateWriter( IUnknown* pUnkCert, IWMWriter **ppWriter );

, documented as such:

http://msdn.microsoft.com/library/default.asp url=/library/en-us/wmform95/htm/wmcreatewriter.asp

,and exported from wmvcore.dll:

Microsoft (R) COFF/PE Dumper Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.

Dump of file c:\winnt\system32\wmvcore.dll

File Type: DLL

 Section contains the following exports for WMVCore.DLL

  ordinal hint RVA   name

     8  0 00021EEA DllRegisterServer
     1  1 0002E9D1 WMCheckURLExtension
     2  2 0002EA56 WMCheckURLScheme
     9  3 000FB05E WMCreateBackupRestorer
     3  4 000FAFEB WMCreateBackupRestorerPrivate
     10  5 000F1A1B WMCreateEditor
     11  6 000F8E32 WMCreateIndexer
     4  7 000FB68F WMCreateLicenseRevocationAgentPrivate
     12  8 000D5ED5 WMCreateProfileManager
     13  9 00022DE8 WMCreateReader
     14  A 00022D43 WMCreateReaderPriv
     15  B 0002B562 WMCreateSyncReader
     5  C 0002B501 WMCreateSyncReaderPriv
     16  D 000854AD WMCreateWriter
     17  E 0009F355 WMCreateWriterFileSink
     18  F 000A1049 WMCreateWriterNetworkSink
     19  10 00085457 WMCreateWriterPriv
     20  11 000AAD51 WMCreateWriterPushSink
     6  12 0003570F WMIsAvailableOffline
     21  13 00023117 WMIsContentProtected
     7  14 0002E925 WMValidateData
Anybody else cares to comment

 
 
Sumedh Barde - MSFT





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

Can you tell me the version of the PSDK you are seeing this issue in

Sumedh


 
 
A.M.





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

It's Windows Server 2003 SP1 SDK (v3790.1830)
 
 
A.M.





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

Also tried the R2 release - same effect. Here's the list of exports from wmvcore.lib:






 
 
Becky Weiss - MSFT





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

I'm looking at the version of wmvcore.dll that comes with Windows Vista Beta 2, and I see that WMCreateWriter is exported from wmvcore.dll; it's ordinal 16.

I might recommend trying to build the various PSDK samples for wmvcore, such as wmvcopy; if that works and runs, then try to follow what it does in terms of linking. It's possible that you're just not linking in the right libs.

Hope that helps, and good luck!

Becky



 
 
A.M.





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

As I have indicated in my posts, WMCreateWriter is exported from the DLL, but missing from the wmvcore.lib library, which is the problem.

If you search the samples, you will see that none of them call WMCreateWriter - the only file where it's referenced is wmsdkidl.h.

Please, take look at wmvcore.lib and wmsdkidl.h before replying.

 


 
 
Becky Weiss - MSFT





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

Among the code samples that your SDK, you should see a sample called WMVCopy, and this one calls WMCreateWriter. Do you see it If you do, can you try building it



 
 
A.M.





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

1. I don't see WMVCopy among the samples. Can you please provide a complete path to this sample When quoting, please make sure that you are quoting a path from a fresh PSDK installation to avoid any leftovers from previous SDK's. Thanks

2. I don't understand why is it so hard to look at the library that is documented as the one that is supposed to have WMCreateWriter exported and it does not. It really is simple - a) check the docs (they say wmvcore.lib has WMCreateWriter exported), b) check the library (there is no WMCreateWriter), c) check the header (where WMCreateWriter's prototype is listed).


 
 
Mike Wasson-MSFT





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

You're right, there is an old version of wmvcore.lib in the DirectShow samples directory (under Samples\Multimedia\DirectShow\Common). That version does not export WMCreateWriter.

Apparently that file was originally shipped in the DirectX SDK to make a couple of the DShow samples build without needing to install the Windows Media Format SDK. When DShow was moved to the PSDK, that file was carried over. But as far as I can tell, none of the DShow samples in the PSDK actually link to that file, so it should probably have been removed from the PSDK.

In any case, you can get the correct version of wmvcore.lib by installing the Format SDK 9.5 from http://msdn.microsoft.com/windowsmedia/downloads/.

Or you can install the Vista B2 PSDK, which has all of the latest Format SDK headers/libs.

----------------------------------------------------------------------------
Mike Wasson, DirectShow SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

(c) 2006 Microsoft Corporation. All rights reserved.



 
 
A.M.





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

Finally, a reply by someone who knows something about the topic.

Here's the problem, though - when I'm trying to install Windows Media Format SDK, I get an error dialog right at the beginning that informs me that this SDK may only be installed on WinXP (I'm running a Win2K3) and then the installer exits.


 
 
Mike Wasson-MSFT





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

I just happen to know some of the convoluted history of the DShow SDK. :-)

I'm not sure about the Format SDK issue you're seeing, but I'll see if I can track down an answer.

----------------------------------------------------------------------------
Mike Wasson, DirectShow SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

(c) 2006 Microsoft Corporation. All rights reserved.



 
 
Mike Wasson-MSFT





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

Well, I didn't realize this, but the Format SDK is not supported on Server 2003:

http://msdn.microsoft.com/library/en-us/wmform95/htm/sdkversions.asp

The next version which is currently in beta will be supported for XP and Vista only. I apologize for not confirming that fact before I pointed you to the Format SDK download.

Mike

----------------------------------------------------------------------------
Mike Wasson, DirectShow SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

(c) 2006 Microsoft Corporation. All rights reserved.




 
 
A.M.





PostPosted: Media Foundation Development, Missing WMCreateWriter in wmvcore.lib Top

I have code that was working and now it appears that there is no way to compile/link this code. Can you (i.e. MS) just post the import library for now, so that people like myself would be able to at least build our existing code until you sort out this issue

BTW, this looks like a blunder on MS' part. How can one forget to ship a library