home *** CD-ROM | disk | FTP | other *** search
- /*++
-
- Copyright (c) 1995-1999 Microsoft Corporation. All rights reserved.
-
- Module Name:
-
- javaax.h
-
- Abstract:
-
- Declarations and definitions for the ActiveX objects and services provided
- by the Microsoft VM.
-
- --*/
-
- #ifndef _JAVAAX_
- #define _JAVAAX_
-
-
- #ifndef __midl
-
-
- #ifdef __cplusplus
- #if _MSC_VER >= 1100
- interface __declspec(novtable) IJavaComModuleManager;
- interface __declspec(novtable) IPersistJavaTypeLib;
- #else
- interface IJavaComModuleManager;
- interface IPersistJavaTypeLib;
- #endif
- #else
- typedef interface IJavaComModuleManager IJavaComModuleManager;
- typedef interface IPersistJavaTypeLib IPersistJavaTypeLib;
- #endif
-
- //
- // CLSID_StdJavaComModuleManager, IJavaComModuleManager
- //
-
- #undef INTERFACE
- #define INTERFACE IJavaComModuleManager
-
- DECLARE_INTERFACE_(IJavaComModuleManager, IUnknown)
- {
- #ifndef NO_BASEINTERFACE_FUNCS
- /* IUnknown methods */
- STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
- STDMETHOD_(ULONG, AddRef)(THIS) PURE;
- STDMETHOD_(ULONG, Release)(THIS) PURE;
- #endif
- /* IJavaComModuleManager methods */
- STDMETHOD(GetClassObject)(THIS_ REFCLSID rclsid, HMODULE hModule, DWORD
- dwClsContext, REFIID riid, LPVOID *ppvObj) PURE;
- STDMETHOD(CanUnloadNow)(THIS_ HMODULE hModule) PURE;
- STDMETHOD(OnModuleUnload)(THIS_ HMODULE hModule) PURE;
- STDMETHOD(RunRegistrationCode)(THIS_ REFCLSID rclsid, HMODULE hModule,
- DWORD dwClsContext, BOOL fRegister) PURE;
- STDMETHOD(ExecCommand)(THIS_ REFCLSID rclsid, HMODULE hModule, UINT nCmdID,
- LPVOID lpvCommandData) PURE;
- };
-
- // {AC680B40-CDA0-11d1-A936-0080C7C575C0}
- DEFINE_GUID(IID_IJavaComModuleManager,
- 0xac680b40, 0xcda0, 0x11d1, 0xa9, 0x36, 0x0, 0x80, 0xc7, 0xc5, 0x75, 0xc0);
-
- // {AC680B41-CDA0-11d1-A936-0080C7C575C0}
- DEFINE_GUID(CLSID_StdJavaComModuleManager,
- 0xac680b41, 0xcda0, 0x11d1, 0xa9, 0x36, 0x0, 0x80, 0xc7, 0xc5, 0x75, 0xc0);
-
- //
- // IPersistJavaTypeLib
- //
- // This is the interface that can be used to persist the type information for a
- // Java class to a type library. This interface can be accessed indirectly
- // through a running Java instance (SDK 2.0+) or directly from the COM class
- // object (SDK 3.0+). Tools may use this to save type libraries for COM
- // applications which require a physical type library to exist. If the Java
- // class implements com.ms.com.NoAutoScripting, then this interface may not
- // be available or the Save method may fail.
- //
- // Example for SDK 2.0 (error checking removed for simplicity):
- //
- // IProvideClassInfo *pci;
- // ITypeInfo *pti;
- // ITypeLib *ptl;
- // IPersistJavaTypeLib *ppjtl;
- //
- // punkJavaObject->QueryInterface(IID_IProvideClassInfo, (LPVOID *) &pci);
- // pci->GetClassInfo(&pti);
- // pti->GetContainingTypeLib(&ptl);
- // ptl->QueryInterface(IID_IPersistJavaTypeLib, (LPVOID *) &ppjtl);
- // ppjtl->Save(pctlib);
- //
- // Example for SDK 3.0 (error checking removed for simplicity):
- //
- // IPersistJavaTypeLib *ppjtl;
- //
- // CoGetClassObject(clsid, CLSCTX_INPROC_SERVER, NULL,
- // IID_IPersistJavaTypeLib, (LPVOID *) &ppjtl);
- // ppjtl->Save(pctlib);
- //
-
- #undef INTERFACE
- #define INTERFACE IPersistJavaTypeLib
-
- DECLARE_INTERFACE_(IPersistJavaTypeLib, IUnknown)
- {
- #ifndef NO_BASEINTERFACE_FUNCS
- /* IUnknown methods */
- STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
- STDMETHOD_(ULONG, AddRef)(THIS) PURE;
- STDMETHOD_(ULONG, Release)(THIS) PURE;
- #endif
- /* IPersistJavaTypeLib methods */
- STDMETHOD(Save)(THIS_ ICreateTypeLib2 *lpctlib) PURE;
- };
-
- // {3A29ACD0-78D5-11d0-AF77-0080C71F7993}
- DEFINE_GUID(IID_IPersistJavaTypeLib,
- 0x3a29acd0, 0x78d5, 0x11d0, 0xaf, 0x77, 0x0, 0x80, 0xc7, 0x1f, 0x79, 0x93);
-
- //
- // CLSID_BrowserAppletControl
- //
- // This is the well-known ActiveX control CLSID that browsers such as Internet
- // Explorer use for hosting applets.
- //
-
- // {08B0E5C0-4FCB-11CF-AAA5-00401C608501}
- DEFINE_GUID(CLSID_BrowserAppletControl,
- 0x08B0E5C0L, 0x4FCB, 0x11CF, 0xAA, 0xA5, 0x00, 0x40, 0x1C, 0x60, 0x85, 0x01);
-
- //
- // CGID_BrowserAppletControl
- //
- // The Browser Applet Control implements IOleCommandTarget with this command
- // group GUID for control specific behavior.
- //
-
- // {349FC790-0C99-11d2-AA15-0080C7C575C0}
- DEFINE_GUID(CGID_BrowserAppletControl,
- 0x349fc790, 0xc99, 0x11d2, 0xaa, 0x15, 0x0, 0x80, 0xc7, 0xc5, 0x75, 0xc0);
-
- // Command ID to return the real IUnknown of the hosted applet. Most clients
- // can access all of the COM functionality through the applet control itself,
- // such as IDispatch or IConnectionPointContainer.
- #define APPLETCMDID_GETAPPLETUNKNOWN 0
-
- //
- // IID_ICreatesJavaObjects
- //
- // A "flag" interface for COM objects in the VM that create Java objects.
- // Examples include the class factories and java: monikers. The "interface"
- // contains no methods beyond the standard IUnknown.
- //
-
- // {92F362C0-CF5A-11d1-A93C-0080C7C575C0}
- DEFINE_GUID(IID_ICreatesJavaObjects,
- 0x92f362c0, 0xcf5a, 0x11d1, 0xa9, 0x3c, 0x0, 0x80, 0xc7, 0xc5, 0x75, 0xc0);
-
- //
- // Custom data GUIDs for use in IDL files and type libraries.
- //
- // MIDL does not currently compile size_is and iid_is attribute information
- // into the type library generated for an IDL file. The GUIDs (and
- // associated macros) below can be used to transfer size_is and iid_is
- // information from an IDL file to a type library, in the form of custom data.
- // JActiveX will look for these custom data GUIDs in type libraries given as
- // input and transfer the size_is and iid_is information to the generated
- // wrapper classes.
- //
- // See the macros (e.g., JTLBATTR_SIZE_IS) below for example IDL usage.
- //
-
- // {31A2F530-484B-11d2-9670-0080C7E171C0}
- DEFINE_GUID(GUID_JavaSizeIs,
- 0x31A2F530, 0x484B, 0x11d2, 0x96, 0x70, 0x0, 0x80, 0xc7, 0xe1, 0x71, 0xc0);
-
-
- // {31A2F531-484B-11d2-9670-0080C7E171C0}
- DEFINE_GUID(GUID_JavaIIDIs,
- 0x31A2F531, 0x484B, 0x11d2, 0x96, 0x70, 0x0, 0x80, 0xc7, 0xe1, 0x71, 0xc0);
-
-
- #else // !ifndef __midl
-
-
- //==============================================================================
- // Custom data attribute "GUIDS"- for use in IDL files.
- //==============================================================================
- #define JTLBATTR_GUID_SIZE_IS 31A2F530-484B-11d2-9670-0080C7E171C0
- #define JTLBATTR_GUID_IID_IS 31A2F531-484B-11d2-9670-0080C7E171C0
-
- //==============================================================================
- // **** NEW FOR Windows 2000 and SDK 4.0 VM ****
- // Custom data attribute macros- for use in IDL files.
- //
- // These macros should be used in parameter attribute lists in IDL files
- // to have size_is and iid_is information propagated to type libraries
- // generated by MIDL. The tool JActiveX, found in the Microsoft SDK for
- // Java, can then be used to generate java classes that carry the
- // size_is/iid_is information.
- // paramData in the macros below may be a string (parameter name) or integer
- // (parameter index) and specifies the attribute parameter that will give the
- // size or iid for the target parameter. If the attribute parameter is passed
- // by-reference (pointer), the VM will automatically dereference it to
- // obtain a usable value.
- // JTLBATTR_SIZE_IS (analog of IDL size_is) can be specified only for parameters
- // that will be arrays in java (generally, pointers).
- // JTLBATTR_IID_IS (analog of IDL iid_is) can be specifed only on for interface
- // pointers and retval, byref interface pointers.
- //
- // Example psuedo-IDL:
- //
- // interface IAttributed : IUnknown
- // {
- // HRESULT _stdcall CreateInstance(
- // [in] REFIID riid,
- // [out, retval, iid_is( riid ), JTLBATTR_IID_IS( "riid" )] IUnknown **ppunk );
- //
- // HRESULT _stdcall In(
- // [in] REFIID riid,
- // [in, iid_is( riid ), JTLBATTR_IID_IS( "riid" )] IUnknown *punk );
- //
- // HRESULT _stdcall Next(
- // [in] ULONG celt,
- // [out, size_is( celt ), JTLBATTR_SIZE_IS( "celt" )] int *rgelt,
- // [out] ULONG *pceltFetched );
- // }
- //
- //==============================================================================
- #define JTLBATTR_SIZE_IS( paramData ) custom( JTLBATTR_GUID_SIZE_IS, paramData )
- #define JTLBATTR_IID_IS( paramData ) custom( JTLBATTR_GUID_IID_IS, paramData )
-
-
- #endif
-
-
- #endif
-