///////////////////////////////////////////////////////////////////////////// // TCDeploy.idl : IDL source for TCDeploy.dll // // This file will be processed by the MIDL tool to // produce the type library (TCDeploy.tlb) and marshalling code. import "oaidl.idl"; import "ocidl.idl"; ///////////////////////////////////////////////////////////////////////////// // Forward Declarations interface ITCDeployment; interface ITCDeploymentEvents; dispinterface TCDeploymentEvents; interface ITCDeploymentQuit; interface ITCDeploymentClass; interface ITCDeploymentProcess; interface ITCDeploymentVersion; ///////////////////////////////////////////////////////////////////////////// // {secret} // DISPID Enumeration // enum dispid_TCDeploy { dispid_OnProcessExit, }; ///////////////////////////////////////////////////////////////////////////// // This should be incremented each time the interface or implementation of // the deployment object changes significantly. It is used by the // implementation of the ITCDeployment::Version property. // const long c_TCDeploymentVersion = 2; ///////////////////////////////////////////////////////////////////////////// [ uuid(067A4B38-FE62-11d2-A50F-00C04F68DEB0), helpstring("Constants for the Execute methods.") ] typedef [v1_enum] enum ShowCmd { ShowCmd_Min = 0, ShowCmd_Hide = 0, // From WinUser.h: SW_HIDE ShowCmd_ShowNormal = 1, // From WinUser.h: SW_SHOWNORMAL ShowCmd_Normal = 1, // From WinUser.h: SW_NORMAL ShowCmd_ShowMinimized = 2, // From WinUser.h: SW_SHOWMINIMIZED ShowCmd_ShowMaximized = 3, // From WinUser.h: SW_SHOWMAXIMIZED ShowCmd_Maximize = 3, // From WinUser.h: SW_MAXIMIZE ShowCmd_ShowNoActivate = 4, // From WinUser.h: SW_SHOWNOACTIVATE ShowCmd_Show = 5, // From WinUser.h: SW_SHOW ShowCmd_Minimize = 6, // From WinUser.h: SW_MINIMIZE ShowCmd_ShowMinNoActive = 7, // From WinUser.h: SW_SHOWMINNOACTIVE ShowCmd_ShowNA = 8, // From WinUser.h: SW_SHOWNA ShowCmd_Restore = 9, // From WinUser.h: SW_RESTORE ShowCmd_ShowDefault = 10, // From WinUser.h: SW_SHOWDEFAULT ShowCmd_ForceMinimize = 11, // From WinUser.h: SW_FORCEMINIMIZE ShowCmd_Max = 11, // From WinUser.h: SW_MAX } ShowCmd; ///////////////////////////////////////////////////////////////////////////// [ object, dual, pointer_default(unique), nonextensible, uuid(5A559CE8-FE11-11D2-A50F-00C04F68DEB0), helpstring("ITCDeployment Interface") ] interface ITCDeployment : IDispatch { [helpstring("Creates the specified object on the specified computer.")] HRESULT CreateObject([in] BSTR bstrProgID, [in, defaultvalue("")] BSTR bstrComputer, [out, retval] IUnknown** ppUnk); [helpstring("Create an object reference string.")] HRESULT ObjectReference([in] IUnknown* pUnk, [out, retval] BSTR* pbstrObjectReference); [helpstring("Sleeps for the specified number of milliseconds.")] HRESULT Sleep([in] long nDurationMS); [helpstring("Executes the specified command and waits for the process to exit.")] HRESULT ExecuteAndWait( [in] BSTR bstrCmdLine, [in, defaultvalue("")] BSTR bstrDirectory, [in, defaultvalue("")] BSTR bstrStdOut, [in, defaultvalue("")] BSTR bstrStdErr, [in, defaultvalue("")] BSTR bstrStdIn, [in, defaultvalue(ShowCmd_Normal)] ShowCmd eShowCmd, [out, retval] long* pnExitCode); [helpstring("Executes the specified command and returns immediately.")] HRESULT Execute( [in] BSTR bstrCmdLine, [in, defaultvalue("")] BSTR bstrDirectory, [in, defaultvalue("")] BSTR bstrStdOut, [in, defaultvalue("")] BSTR bstrStdErr, [in, defaultvalue("")] BSTR bstrStdIn, [in, defaultvalue(ShowCmd_Normal)] ShowCmd eShowCmd, [out, retval] ITCDeploymentProcess** ppProcess); [helpstring("Registers the components in the specified DLL.")] HRESULT RegServer( [in] BSTR bstrModule, [out, retval] BSTR* pbstrResult); [helpstring("Unregisters the components in the specified DLL.")] HRESULT UnregServer( [in] BSTR bstrModule, [out, retval] BSTR* pbstrResult); [propget, helpstring("Gets the version information of the deployment object.")] HRESULT Version([out, retval] ITCDeploymentVersion** ppVersion); [helpstring("Creates an object by binding the specified moniker display name.")] HRESULT GetObject([in] BSTR bstrMoniker, [in, defaultvalue(-1)] VARIANT_BOOL bAllowUI, [in, defaultvalue(-1)] long nTimeoutMS, [out, retval] IUnknown** ppUnk); // [helpstring("Kills the process specified by name (VT_BSTR) or ID (VT_I4).")] // HRESULT KillProcess([in] VARIANT* pvarNameOrID, [in] VARIANT_BOOL bForce]; [helpstring("Writes the contents of the specified stream to the specified file.")] HRESULT WriteStreamToFile([in] BSTR bstrFileName, [in] VARIANT* pvarStream, [in, defaultvalue(0)] VARIANT_BOOL bOverwrite); [helpstring("Gets the process ID of the specified module base name. Currently, only works under Windows NT/2000.")] HRESULT GetProcessID([in] BSTR bstrName, [out, retval] long* pdwProcessID); }; // End: interface ITCDeployment : IDispatch ///////////////////////////////////////////////////////////////////////////// [ object, oleautomation, pointer_default(unique), nonextensible, uuid(84DA5122-026C-11d3-AEF3-0000F810C3F4), helpstring("ITCDeploymentEvents Interface") ] interface ITCDeploymentEvents : IUnknown { [id(dispid_OnProcessExit), helpstring("Indicates that a process has exited.")] HRESULT OnProcessExit([in] long nExitCode, [in] BSTR bstrComputer, [in] ITCDeploymentProcess* pProcess); }; // End: interface ITCDeploymentEvents : IUnknown ///////////////////////////////////////////////////////////////////////////// [ uuid(9E910DCA-026C-11d3-AEF3-0000F810C3F4), helpstring("TCDeploymentEvents Interface") ] dispinterface TCDeploymentEvents { interface ITCDeploymentEvents; }; // End: dispinterface TCDeploymentEvents ///////////////////////////////////////////////////////////////////////////// [ object, hidden, restricted, pointer_default(unique), nonextensible, uuid(C9437658-0F29-11d3-AEF9-0000F810C3F4), helpstring("ITCDeploymentQuit Interface") ] interface ITCDeploymentQuit : IUnknown { [helpstring("Forceably disconnects all objects and deletes itself.")] HRESULT Quit(); }; // End: interface ITCDeploymentQuit : IUnknown ///////////////////////////////////////////////////////////////////////////// [ object, hidden, restricted, pointer_default(unique), nonextensible, uuid(B9C2AE18-0F26-11d3-AEF9-0000F810C3F4), helpstring("ITCDeploymentClass Interface") ] interface ITCDeploymentClass : ITCDeploymentQuit { [propput, helpstring("Increments the external reference count when running under the surrogate process.")] HRESULT NoExit([in] VARIANT_BOOL bNoExit); [propget] HRESULT NoExit([out, retval] VARIANT_BOOL* pbNoExit); }; // End: interface ITCDeploymentClass : IUnknown ///////////////////////////////////////////////////////////////////////////// [ object, dual, pointer_default(unique), nonextensible, uuid(99B7AE2C-07EF-11d3-AEF9-0000F810C3F4), helpstring("ITCDeploymentProcess Interface") ] interface ITCDeploymentProcess : IDispatch { [propget, helpstring("Gets the completion status of the process.")] HRESULT IsCompleted([out, retval] VARIANT_BOOL* pbCompleted); [propget, helpstring("Gets the exit code of the process.")] HRESULT ExitCode([out, retval] long* pnExitCode); // [propget, helpstring("Gets the process ID.")] // HRESULT ProcessID([out, retval] long* pnID); // [helpstring("Kills the process.")] // HRESULT Kill([in] VARIANT_BOOL bForce); }; // End: interface ITCDeploymentProcess : IDispatch ///////////////////////////////////////////////////////////////////////////// [ object, dual, pointer_default(unique), nonextensible, uuid(812F99B1-ADF8-45f5-BB3F-D04E035AB863), helpstring("ITCDeploymentVersion Interface") ] interface ITCDeploymentVersion : IDispatch { #include "..\TCAtl\VersionInfoImpl.idl" }; // End: interface ITCDeploymentVersion : IDispatch ///////////////////////////////////////////////////////////////////////////// [ uuid(090ED2D2-FE11-11D2-A50F-00C04F68DEB0), version(1.0), helpstring("TCDeploy 1.0 Type Library") ] library TCDeployLib { importlib("stdole32.tlb"); importlib("stdole2.tlb"); /////////////////////////////////////////////////////////////////////////// // Reference these so that they get into the typelib interface ITCDeploymentQuit; interface ITCDeploymentClass; /////////////////////////////////////////////////////////////////////////// [ uuid(5A559CE9-FE11-11D2-A50F-00C04F68DEB0), helpstring("TCDeployment Class") ] coclass TCDeployment { [default ] interface ITCDeployment; [default , source] dispinterface TCDeploymentEvents; [defaultvtable, source] interface ITCDeploymentEvents; }; // End: coclass TCDeployment /////////////////////////////////////////////////////////////////////////// [ uuid(743BF146-07F5-11d3-AEF9-0000F810C3F4), helpstring("TCDeploymentProcess Class") ] coclass TCDeploymentProcess { [default] interface ITCDeploymentProcess; }; // End: coclass TCDeploymentProcess /////////////////////////////////////////////////////////////////////////// [ uuid(BE969F01-FB2F-4d8e-8C8E-7234B8FDE2B0), helpstring("TCDeploymentVersion Class") ] coclass TCDeploymentVersion { [default] interface ITCDeploymentVersion; }; // End: coclass TCDeploymentVersion }; // End: library TCDeployLib ///////////////////////////////////////////////////////////////////////////// cpp_quote("/////////////////////////////////////////////////////////////////////////////") cpp_quote("// CATID Declarations") cpp_quote("") cpp_quote("#ifdef __cplusplus") cpp_quote(" extern \"C\" const __declspec(selectany) CATID CATID_TCDeploy =") cpp_quote(" {0xae385d22,0xfeb9,0x11d2,{0xae,0xf2,0x00,0x00,0xf8,0x10,0xc3,0xf4}};") cpp_quote("#endif // __cplusplus") cpp_quote("") cpp_quote("#if defined(__cplusplus) && _MSC_VER >= 1100") cpp_quote(" extern \"C++\"") cpp_quote(" {") cpp_quote(" /////////////////////////////////////////////////////////////////////////") cpp_quote(" // Smart Pointer Declarations") cpp_quote("") cpp_quote(" #include ") cpp_quote("") cpp_quote(" #ifndef TC_COM_SMARTPTR_TYPEDEF") cpp_quote(" #define TC_COM_SMARTPTR_TYPEDEF(Interface) \\") cpp_quote(" _COM_SMARTPTR_TYPEDEF(Interface, __uuidof(Interface))") cpp_quote(" #endif // TC_COM_SMARTPTR_TYPEDEF") cpp_quote("") cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(ITCDeployment);") cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(ITCDeploymentEvents);") cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(ITCDeploymentQuit);") cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(ITCDeploymentClass);") cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(ITCDeploymentProcess);") cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(ITCDeploymentVersion);") cpp_quote("") cpp_quote(" } // extern \"C++\"") cpp_quote("#endif // defined(__cplusplus) && _MSC_VER >= 1100") cpp_quote("")