⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 picture.idl

📁 Vc.Net入门与提高源码
💻 IDL
字号:
// Picture.idl : IDL source for Picture.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (Picture.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";

// 16 base colors-enumeration
typedef [helpstring("16 base colors")]
enum
{
    Black = 0,
    DarkRed = 1,
    DarkGreen = 2,
    DarkYellow = 3,
    DarkBlue = 4,
    DarkMagenta = 5,
    DarkCyan = 6,
    DarkGray = 7,
    LightGray = 8,
    Red = 9,
    Green = 10,
    Yellow = 11,
    Blue = 12,
    Magenta = 13,
    Cyan = 14,
    White = 15
} baseColors;

[
    object,
    uuid(3F84D881-9AB2-425A-8938-A3CCC7BB0465),
    dual,
    helpstring("IPixel Interface"),
    pointer_default(unique)
]
interface IPixel : IDispatch
{
    [propget, id(DISPID_VALUE), helpstring("Pixel color")] 
    HRESULT Color([out, retval] baseColors *pVal);

    [propput, id(DISPID_VALUE), helpstring("Pixel color")] 
    HRESULT Color([in] baseColors newVal);
    
    [propget, id(2), helpstring("Pixel row position")] 
    HRESULT Row([out, retval] long *pVal);

    [propput, id(2), helpstring("Pixel row position")] 
    HRESULT Row([in] long newVal);

    [propget, id(3), helpstring("Pixel column position")] 
    HRESULT Column([out, retval] long *pVal);
    
    [propput, id(3), helpstring("Pixel column position")] 
    HRESULT Column([in] long newVal);
};

[
    object,
    uuid(2700E477-FDD4-4493-9529-D359B09DEF63),
    dual,
    helpstring("IPixels Interface"),
    pointer_default(unique)
]
interface IPixels : IDispatch
{
    [propget, id(DISPID_NEWENUM), helpstring("Read-only pixels")] 
    HRESULT _NewEnum([out, retval] IUnknown* *pVal);

    [propget, id(1), helpstring("Number of pixels in the bitmap")] 
    HRESULT Count([out, retval] long *pVal);

    [propget, id(DISPID_VALUE), helpstring("Pixel color")] 
    HRESULT Color(long x, long y, [out, retval] baseColors *pVal);

    [propput, id(DISPID_VALUE), helpstring("Pixel color")] 
    HRESULT Color(long x, long y, [in] baseColors newVal);

	[propget, id(2), helpstring("property Pixel")] 
	HRESULT Pixel(long x, long y, [out, retval] IPixel* *pVal);
	
	[propput, id(2), helpstring("property Pixel")] 
	HRESULT Pixel(long x, long y, [in] IPixel* newVal);

};

[
    object,
    uuid(EEE01524-1CFB-4C2B-8AA3-87B5977F6FB4),
    dual,
    helpstring("IBitmap Interface"),
    pointer_default(unique)
]
interface IBitmap : IDispatch
{
    [propget, id(1), helpstring("Width in pixels")] 
    HRESULT Width([out, retval] long *pVal);

    [propput, id(1), helpstring("Width in pixels")] 
    HRESULT Width([in] long newVal);

    [propget, id(2), helpstring("Height in pixels")] 
    HRESULT Height([out, retval] long *pVal);

    [propput, id(2), helpstring("Height in pixels")]
    HRESULT Height([in] long newVal);

    [id(3), helpstring("Set a points array")]
    HRESULT SetPoints([in] VARIANT vPoints);

    [id(5), helpstring("Save bitmap to a stream")]
    HRESULT SaveToStream([in] IStream* pStream);

    [id(6), helpstring("Save bitmap to a file on a partition")]
    HRESULT SaveToFile([in, optional] VARIANT vbstrFileName, 
                       [in, optional] VARIANT vhWndParentWindow);

	[id(7), helpstring("Save bitmap to the IIS4 ASP Response Object")]
    HRESULT SaveToIIS4Response(/*[in]*/ VARIANT vResponse);

    [propget, id(8), helpstring("Autosize mode")]
    HRESULT AutoSize([out, retval] VARIANT_BOOL *pVal);

    [propput, id(8), helpstring("Autosize mode")]
    HRESULT AutoSize([in] VARIANT_BOOL newVal);

    [propget, id (9), helpstring("property Pixels")] 
    HRESULT Pixels([out, retval] IPixels* *pVal);
};

[
    uuid(D2168152-D149-4DCB-9292-FD2B93BC6985),
    version(1.0),
    helpstring("Picture 1.0 Type Library")
]
library PICTURELib
{
    importlib("stdole32.tlb");
    importlib("stdole2.tlb");

    [
        uuid(650FC1F7-14FC-4A33-836E-C43EF3FBA4FF),
        helpstring("Pixel Class")
    ]
    coclass Pixel
    {
        [default] interface IPixel;
    };

    [
        uuid(42B421A8-FF37-4143-A444-11C210C40D6F),
        helpstring("Bitmap Class")
    ]
    coclass Bitmap
    {
        [default] interface IBitmap;
    };
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -