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

[
   object,
   uuid(c8a282e5-ab72-4852-bdc0-1894278e93c2),
   dual,
   helpstring("IConfigureYourServer Interface"),
   pointer_default(unique)
]
interface IConfigureYourServer
   :
   IDispatch
{
   [id(1), helpstring("launch a wizard, return when it's done.")]
   HRESULT
   ExecuteWizard(
      [in]           BSTR  service,
      [out, retval]  BSTR* resultText);

   [id(2), helpstring("machine's role in a domain")] 
   HRESULT
   DsRole(
      [in]           int  infoLevel,
      [out, retval]  int* role);

   [id(3), helpstring("0 if not installed, 1 if installed, -1 if should not install")] 
   HRESULT
   IsServiceInstalled(
      [in]           BSTR  bstrService,
      [out, retval]  int*  state);

   [id(4), helpstring("auto install specified service")] 
   HRESULT
   InstallService(
      [in]           BSTR  bstrService,
      [in]           BSTR  infFileText,
      [in]           BSTR  unattendFileText,
      [out, retval]  BOOL* pbRet);

   [id(5), helpstring("validate domain DNS or Netbios name")] 
   HRESULT
   ValidateName(
      [in]           BSTR  bstrType,
      [in]           BSTR  bstrName,
      [out, retval]  int*  retval);

   [id(6), helpstring("setup ip parameters")]
   HRESULT
   SetStaticIpAddressAndSubnetMask(
      [in]           BSTR  staticIp,
      [in]           BSTR  subnetMask,
      [out, retval]  BOOL* success);

   [id(7), helpstring("Determine if this box can be 1st server")] 
   HRESULT
   CheckDhcpServer(
      [out, retval]  BOOL* retval);

   [id(8), helpstring("test if dchp wizard needs to be run")]
   HRESULT
   IsDhcpConfigured(
      [out, retval]  BOOL* retval);

   [id(9), helpstring("execute the command line, wait until the process exits")]
   HRESULT
   CreateAndWaitForProcess( 
      [in]           BSTR  commandLine,
      [out, retval]  long* retval);

   [id(10), helpstring("determines if current logged-on user is local admin")]
   HRESULT
   IsCurrentUserAdministrator(
      [out, retval]  BOOL* retval);

   [id(11), helpstring("browse for folder")]
   HRESULT
   BrowseForFolder(
      [in]           BSTR  windowTitle,
      [out, retval]  BSTR* folderPath);

   [id(12), helpstring("get local machine product type")]
   HRESULT
   GetProductSku(
      [out, retval]  int* retval);

   [id(13), helpstring("test if clustering wizard needs to be run")]
   HRESULT
   IsClusteringConfigured(
      [out, retval]  BOOL* retval);
};

[
   uuid(c273e2e0-7260-4c74-abe6-2de2f6fffae9),
   version(1.0),
   helpstring("ConfigureYourServer 1.0 Type Library")
]
library ConfigureYourServerLib
{
   importlib("stdole32.tlb");
   importlib("stdole2.tlb");

   [
      uuid(505ba74d-28fc-411d-bd4a-3b9d1e01433a),
      helpstring("ConfigureYourServer Class")
   ]
   coclass ConfigureYourServer
   {
      [default] interface IConfigureYourServer;
   };
};
