如何创建一个类似Flash的Activex呢?在IE里面可以点某种类型的文件而被激活?
实在是烦透了!请大家帮忙!分多多!

解决方案 »

  1.   

    下面是Flash的类型库大家分析!
    [
      uuid(D27CDB6B-AE6D-11CF-96B8-444553540000), 
      version(1.0), 
      helpstring("Shockwave Flash"), 
      custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, 84082968), 
      custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, 1038422283)
        
    ]
    library ShockwaveFlashObjects
    {  importlib("stdole2.tlb");
      importlib("stdvcl40.dll");  [
        uuid(D27CDB6C-AE6D-11CF-96B8-444553540000), 
        helpstring("Shockwave Flash"), 
        dual, 
        oleautomation
      ]
       interface IShockwaveFlash: IDispatch
      {
        [
        propget, 
        id(0xFFFFFDF3), 
        helpstring("property ReadyState")
        ]
        HRESULT _stdcall ReadyState([out, retval] long * pVal );
        [
        propget, 
        id(0x0000007C), 
        helpstring("property TotalFrames")
        ]
        HRESULT _stdcall TotalFrames([out, retval] long * pVal );
        [
        propget, 
        id(0x0000007D), 
        helpstring("property Playing")
        ]
        HRESULT _stdcall Playing([out, retval] VARIANT_BOOL * pVal );
        [
        propput, 
        id(0x0000007D), 
        helpstring("property Playing")
        ]
        HRESULT _stdcall Playing([in] VARIANT_BOOL pVal );
        [
        propget, 
        id(0x00000069), 
        helpstring("property Quality")
        ]
        HRESULT _stdcall Quality([out, retval] int * pVal );
        [
        propput, 
        id(0x00000069), 
        helpstring("property Quality")
        ]
        HRESULT _stdcall Quality([in] int pVal );
        [
        propget, 
        id(0x00000078), 
        helpstring("property ScaleMode")
        ]
        HRESULT _stdcall ScaleMode([out, retval] int * pVal );
        [
        propput, 
        id(0x00000078), 
        helpstring("property ScaleMode")
        ]
        HRESULT _stdcall ScaleMode([in] int pVal );
        [
        propget, 
        id(0x00000079), 
        helpstring("property AlignMode")
        ]
        HRESULT _stdcall AlignMode([out, retval] int * pVal );
        [
        propput, 
        id(0x00000079), 
        helpstring("property AlignMode")
        ]
        HRESULT _stdcall AlignMode([in] int pVal );
        [
        propget, 
        id(0x0000007B), 
        helpstring("property BackgroundColor")
        ]
        HRESULT _stdcall BackgroundColor([out, retval] long * pVal );
        [
        propput, 
        id(0x0000007B), 
        helpstring("property BackgroundColor")
        ]
        HRESULT _stdcall BackgroundColor([in] long pVal );
        [
        propget, 
        id(0x0000006A), 
        helpstring("property Loop")
        ]
        HRESULT _stdcall Loop([out, retval] VARIANT_BOOL * pVal );
        [
        propput, 
        id(0x0000006A), 
        helpstring("property Loop")
        ]
        HRESULT _stdcall Loop([in] VARIANT_BOOL pVal );
        [
        propget, 
        id(0x00000066), 
        helpstring("property Movie")
        ]
        HRESULT _stdcall Movie([out, retval] BSTR * pVal );
        [
        propput, 
        id(0x00000066), 
        helpstring("property Movie")
        ]
        HRESULT _stdcall Movie([in] BSTR pVal );
        [
        propget, 
        id(0x0000006B), 
        helpstring("property FrameNum")
        ]
        HRESULT _stdcall FrameNum([out, retval] long * pVal );
        [
        propput, 
        id(0x0000006B), 
        helpstring("property FrameNum")
        ]
        HRESULT _stdcall FrameNum([in] long pVal );
        [
        id(0x0000006D), 
        helpstring("method SetZoomRect")
        ]
        HRESULT _stdcall SetZoomRect([in] long left, [in] long top, [in] long right, [in] long bottom );
        [
        id(0x00000076), 
        helpstring("method Zoom")
        ]
        HRESULT _stdcall Zoom([in] int factor );
        [
        id(0x00000077), 
        helpstring("method Pan")
        ]
        HRESULT _stdcall Pan([in] long x, [in] long y, [in] int mode );
        [
        id(0x00000070), 
        helpstring("method Play")
        ]
        HRESULT _stdcall Play( void );
        [
        id(0x00000071), 
        helpstring("method Stop")
        ]
        HRESULT _stdcall Stop( void );
        [
        id(0x00000072), 
        helpstring("method Back")
        ]
        HRESULT _stdcall Back( void );
        [
        id(0x00000073), 
        helpstring("method Forward")
        ]
        HRESULT _stdcall Forward( void );
        [
        id(0x00000074), 
        helpstring("method Rewind")
        ]
        HRESULT _stdcall Rewind( void );
        [
        id(0x0000007E), 
        helpstring("method StopPlay")
        ]
        HRESULT _stdcall StopPlay( void );
        [
        id(0x0000007F), 
        helpstring("method GotoFrame")
        ]
        HRESULT _stdcall GotoFrame([in] long FrameNum );
        [
        id(0x00000080), 
        helpstring("method CurrentFrame")
        ]
        HRESULT _stdcall CurrentFrame([out, retval] long * FrameNum );
        [
        id(0x00000081), 
        helpstring("method IsPlaying")
        ]
        HRESULT _stdcall IsPlaying([out, retval] VARIANT_BOOL * Playing );
        [
        id(0x00000082), 
        helpstring("method PercentLoaded")
        ]
      

  2.   

    HRESULT _stdcall PercentLoaded([out, retval] long * percent );
        [
        id(0x00000083), 
        helpstring("method FrameLoaded")
        ]
        HRESULT _stdcall FrameLoaded([in] long FrameNum, [out, retval] VARIANT_BOOL * loaded );
        [
        id(0x00000084), 
        helpstring("method FlashVersion")
        ]
        HRESULT _stdcall FlashVersion([out, retval] long * version );
        [
        propget, 
        id(0x00000085), 
        helpstring("property WMode")
        ]
        HRESULT _stdcall WMode([out, retval] BSTR * pVal );
        [
        propput, 
        id(0x00000085), 
        helpstring("property WMode")
        ]
        HRESULT _stdcall WMode([in] BSTR pVal );
        [
        propget, 
        id(0x00000086), 
        helpstring("property SAlign")
        ]
        HRESULT _stdcall SAlign([out, retval] BSTR * pVal );
        [
        propput, 
        id(0x00000086), 
        helpstring("property SAlign")
        ]
        HRESULT _stdcall SAlign([in] BSTR pVal );
        [
        propget, 
        id(0x00000087), 
        helpstring("property Menu")
        ]
        HRESULT _stdcall Menu([out, retval] VARIANT_BOOL * pVal );
        [
        propput, 
        id(0x00000087), 
        helpstring("property Menu")
        ]
        HRESULT _stdcall Menu([in] VARIANT_BOOL pVal );
        [
        propget, 
        id(0x00000088), 
        helpstring("property Base")
        ]
        HRESULT _stdcall Base([out, retval] BSTR * pVal );
        [
        propput, 
        id(0x00000088), 
        helpstring("property Base")
        ]
        HRESULT _stdcall Base([in] BSTR pVal );
        [
        propget, 
        id(0x00000089), 
        helpstring("property Scale")
        ]
        HRESULT _stdcall Scale([out, retval] BSTR * pVal );
        [
        propput, 
        id(0x00000089), 
        helpstring("property Scale")
        ]
        HRESULT _stdcall Scale([in] BSTR pVal );
        [
        propget, 
        id(0x0000008A), 
        helpstring("property DeviceFont")
        ]
        HRESULT _stdcall DeviceFont([out, retval] VARIANT_BOOL * pVal );
        [
        propput, 
        id(0x0000008A), 
        helpstring("property DeviceFont")
        ]
        HRESULT _stdcall DeviceFont([in] VARIANT_BOOL pVal );
        [
        propget, 
        id(0x0000008B), 
        helpstring("property EmbedMovie")
        ]
        HRESULT _stdcall EmbedMovie([out, retval] VARIANT_BOOL * pVal );
        [
        propput, 
        id(0x0000008B), 
        helpstring("property EmbedMovie")
        ]
        HRESULT _stdcall EmbedMovie([in] VARIANT_BOOL pVal );
        [
        propget, 
        id(0x0000008C), 
        helpstring("property BGColor")
        ]
        HRESULT _stdcall BGColor([out, retval] BSTR * pVal );
        [
        propput, 
        id(0x0000008C), 
        helpstring("property BGColor")
        ]
        HRESULT _stdcall BGColor([in] BSTR pVal );
        [
        propget, 
        id(0x0000008D), 
        helpstring("property Quality2")
        ]
        HRESULT _stdcall Quality2([out, retval] BSTR * pVal );
        [
        propput, 
        id(0x0000008D), 
        helpstring("property Quality2")
        ]
        HRESULT _stdcall Quality2([in] BSTR pVal );
        [
        id(0x0000008E), 
        helpstring("method LoadMovie")
        ]
        HRESULT _stdcall LoadMovie([in] int layer, [in] BSTR url );
        [
        id(0x0000008F), 
        helpstring("method TGotoFrame")
        ]
        HRESULT _stdcall TGotoFrame([in] BSTR target, [in] long FrameNum );
        [
        id(0x00000090), 
        helpstring("method TGotoLabel")
        ]
        HRESULT _stdcall TGotoLabel([in] BSTR target, [in] BSTR label );
        [
        id(0x00000091), 
        helpstring("method TCurrentFrame")
        ]
        HRESULT _stdcall TCurrentFrame([in] BSTR target, [out, retval] long * FrameNum );
        [
        id(0x00000092), 
        helpstring("method TCurrentLabel")
        ]
        HRESULT _stdcall TCurrentLabel([in] BSTR target, [out, retval] BSTR * pVal );
        [
        id(0x00000093), 
        helpstring("method TPlay")
        ]
        HRESULT _stdcall TPlay([in] BSTR target );
        [
        id(0x00000094), 
        helpstring("method TStopPlay")
        ]
        HRESULT _stdcall TStopPlay([in] BSTR target );
        [
        id(0x00000097), 
        helpstring("method SetVariable")
        ]
        HRESULT _stdcall SetVariable([in] BSTR name, [in] BSTR value );
        [
        id(0x00000098), 
        helpstring("method GetVariable")
        ]
        HRESULT _stdcall GetVariable([in] BSTR name, [out, retval] BSTR * pVal );
        [
        id(0x00000099), 
        helpstring("method TSetProperty")
        ]
        HRESULT _stdcall TSetProperty([in] BSTR target, [in] int property, [in] BSTR value );
        [
        id(0x0000009A), 
        helpstring("method TGetProperty")
        ]
        HRESULT _stdcall TGetProperty([in] BSTR target, [in] int property, [out, retval] BSTR * pVal );
        [
        id(0x0000009B), 
        helpstring("method TCallFrame")
        ]
        HRESULT _stdcall TCallFrame([in] BSTR target, [in] int FrameNum );
        [
        id(0x0000009C), 
        helpstring("method TCallLabel")
        ]
        HRESULT _stdcall TCallLabel([in] BSTR target, [in] BSTR label );
        [
        id(0x0000009D), 
        helpstring("method TSetPropertyNum")
        ]
        HRESULT _stdcall TSetPropertyNum([in] BSTR target, [in] int property, [in] double value );
        [
        id(0x0000009E), 
        helpstring("method TGetPropertyNum")
        ]
        HRESULT _stdcall TGetPropertyNum([in] BSTR target, [in] int property, [out, retval] double * pVal );
        [
        id(0x000000AC), 
        helpstring("method TGetPropertyAsNumber")
        ]
      

  3.   

    HRESULT _stdcall SWRemote([in] BSTR pVal );
        [
        propget, 
        id(0x000000AA), 
        helpstring("property FlashVars")
        ]
        HRESULT _stdcall FlashVars([out, retval] BSTR * pVal );
        [
        propput, 
        id(0x000000AA), 
        helpstring("property FlashVars")
        ]
        HRESULT _stdcall FlashVars([in] BSTR pVal );
        [
        propget, 
        id(0x000000AB), 
        helpstring("property AllowScriptAccess")
        ]
        HRESULT _stdcall AllowScriptAccess([out, retval] BSTR * pVal );
        [
        propput, 
        id(0x000000AB), 
        helpstring("property AllowScriptAccess")
        ]
        HRESULT _stdcall AllowScriptAccess([in] BSTR pVal );
      };  [
        uuid(D27CDB6D-AE6D-11CF-96B8-444553540000), 
        helpstring("Event interface for Shockwave Flash"), 
        hidden
      ]
       dispinterface _IShockwaveFlashEvents
      {
        properties:
        methods:
        [
        id(0xFFFFFD9F)
        ]
        void OnReadyStateChange(long newState );
        [
        id(0x000007A6)
        ]
        void OnProgress(long percentDone );
        [
        id(0x00000096)
        ]
        void FSCommand([in] BSTR command, [in] BSTR args );
      };  [
        uuid(D27CDB6E-AE6D-11CF-96B8-444553540000), 
        helpstring("Shockwave Flash")
      ]
      coclass ShockwaveFlash
      {
        [default] interface IShockwaveFlash;
        [default, source] dispinterface _IShockwaveFlashEvents;
      };  [
        uuid(1171A62F-05D2-11D1-83FC-00A0C9089C5A), 
        helpstring("Macromedia Flash Player Properties")
      ]
      coclass FlashProp
      {
        [default] interface IUnknown;
      };  [
        uuid(D27CDB70-AE6D-11CF-96B8-444553540000), 
        helpstring("IFlashFactory Interface")
      ]
       interface IFlashFactory: IUnknown
      {
      };  [
        uuid(D27CDB72-AE6D-11CF-96B8-444553540000), 
        helpstring("IFlashObjectInterface Interface")
      ]
       interface IFlashObjectInterface: IDispatchEx
      {
      };  [
        uuid(D27CDB71-AE6D-11CF-96B8-444553540000), 
        helpstring("IFlashObjectInterface Interface")
      ]
      coclass FlashObjectInterface
      {
        [default] interface IDispatchEx;
      };  
      typedef  struct tag DISPPARAMS * PUserType1;  
      typedef unsigned int * PSYSUINT1;  
      typedef  struct tag GUID * PUserType2;  [
        uuid(A6EF9860-C720-11D0-9337-00A0C90DCAA9)
      ]
       interface IDispatchEx: IDispatch
      {
        HRESULT _stdcall GetDispID([in] BSTR bstrName, [in] unsigned long grfdex, [out] long * pid );
        HRESULT _stdcall RemoteInvokeEx([in] long id, [in] unsigned long lcid, [in] unsigned long dwFlags, [in] DISPPARAMS * pdp, [out] VARIANT * pvarRes, [out] EXCEPINFO * pei, [in] IServiceProvider * pspCaller, [in] unsigned int cvarRefArg, [in] unsigned int * rgiRefArg, [in, out] VARIANT * rgvarRefArg );
        HRESULT _stdcall DeleteMemberByName([in] BSTR bstrName, [in] unsigned long grfdex );
        HRESULT _stdcall DeleteMemberByDispID([in] long id );
        HRESULT _stdcall GetMemberProperties([in] long id, [in] unsigned long grfdexFetch, [out] unsigned long * pgrfdex );
        HRESULT _stdcall GetMemberName([in] long id, [out] BSTR * pbstrName );
        HRESULT _stdcall GetNextDispID([in] unsigned long grfdex, [in] long id, [out] long * pid );
        HRESULT _stdcall GetNameSpaceParent([out]  IUnknown ** ppunk );
      };  [
        uuid(6D5140C1-7436-11CE-8034-00AA006009FA)
      ]
       interface IServiceProvider: IUnknown
      {
        HRESULT _stdcall RemoteQueryService([in] GUID * guidService, [in] GUID * riid, [out]  IUnknown ** ppvObject );
      };};