www.pudn.com > QRAPPuie.rar > myimage.h


// 
// Copyright (c) Microsoft Corporation.  All rights reserved. 
// 
// 
// Use of this source code is subject to the terms of the Microsoft end-user 
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. 
// If you did not accept the terms of the EULA, you are not authorized to use 
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your 
// install media. 
// 
#include  
#include  
#include  
#include  
#include  
 
 
enum CodecType {eDecoder, eEncoder}; 
/* 
#define  NAMEVALENTRY(x)   { (LONG)(x), TEXT(#x) }  
 
struct NameValuePair { 
    LONG pValue; 
    TCHAR *szName; 
}; 
 
class cMapClass 
{ 
public: 
    cMapClass() {} 
    cMapClass(struct NameValuePair *nvp):m_funcEntryStruct(nvp) {} 
    ~cMapClass() {} 
     
    TCHAR * operator [](GUID index); 
    TCHAR * operator[](LONG index); 
 
private: 
    struct NameValuePair *m_funcEntryStruct; 
}; 
 
typedef cMapClass MapClass; 
*/ 
 
//LRESULT CALLBACK WndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); 
//BOOL OpenWindow(DWORD dwWidth, DWORD dwHeight, const TCHAR* tszName); 
//void info (const TCHAR* tszFormat, ...); 
HRESULT CreateStreamOnFile(const TCHAR * tszFilename, IStream** ppStream); 
BOOL GetCodecCLSID(IImagingFactory* pImagingFactory, CLSID * clsid, WCHAR * wszMimeType, CodecType ctCodec); 
//void DisplayEncoder(IImageEncoder * pImageEncoder); 
void UserCodecTest(IImagingFactory* pImagingFactory); 
int myimage(TCHAR *tszName, TCHAR* tszOutput,TCHAR* tszMime);// return 0 means success