<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:΢ÈíÑźÚ
}
--></style>
</head>
<body class='hmmessage'>
<span class="Apple-style-span" style="font-family: 'liberation sans', 'Myriad ', 'Bitstream Vera Sans', 'Lucida Grande', 'Luxi Sans', 'Trebuchet MS', helvetica, verdana, arial, sans-serif; font-size: 12px; line-height: 15px; "><div class="example-contents" style="line-height: 1.29em; padding-top: 0px; "><pre class="programlisting" style="line-height: 1.29em; font-family: 'liberation mono', 'bitstream vera mono', 'dejavu mono', monospace; display: block; background-color: rgb(238, 238, 238); margin-bottom: 0.3em; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; white-space: pre-wrap; word-wrap: break-word; font-size: 0.9em; border-top-left-radius: 11px 11px; border-top-right-radius: 11px 11px; border-bottom-right-radius: 11px 11px; border-bottom-left-radius: 11px 11px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; bor!
 der-left-style: solid; border-top-color: rgb(153, 153, 153); border-right-color: rgb(153, 153, 153); border-bottom-color: rgb(153, 153, 153); border-left-color: rgb(153, 153, 153); background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; "><span class="Apple-style-span" style="color: black; ">int i;
int numDomains;
char **inactiveDomains;

numDomains = virConnectNumOfDefinedDomains(conn);

inactiveDomains = malloc(sizeof(char *) * numDomains);
</span><font class="Apple-style-span" color="#FF0000">numDomains = virConnectListDomains(conn, inactiveDomains, numDomains);</font>

printf("Inactive domain names:\n");
for (i = 0 ; i < numDomains ; i++) {
    printf("  %s\n", inactiveDomains[i]);
    free(inactiveDomains[i]);
}
free(inactiveDomains);
</pre></div><h6 style="line-height: 1.29em; color: rgb(60, 133, 124); margin-top: 0em; margin-bottom: 0em; background-color: transparent; font-size: 1em; "><span class="Apple-tab-span" style="white-space:pre"> </span></h6><h6 style="line-height: 1.29em; color: rgb(60, 133, 124); margin-top: 0em; margin-bottom: 0em; background-color: transparent; font-size: 1em; ">Example 4.5. Listing inactive domains</h6><h6 style="line-height: 1.29em; color: rgb(60, 133, 124); margin-top: 0em; margin-bottom: 0em; background-color: transparent; font-size: 1em; "><br></h6><h6 style="line-height: 1.29em; color: rgb(60, 133, 124); margin-top: 0em; margin-bottom: 0em; background-color: transparent; font-size: 1em; "><br></h6><h6 style="line-height: 1.29em; color: rgb(60, 133, 124); margin-top: 0em; margin-bottom: 0em; background-color: transparent; font-size: 1em; ">There should use "virConnectListDefinedDomains" for inactive domains.  </h6></span>                                        </body>
</html>