The following example describes how to create a new virtualization instance named "example_vi1" in the DNS server.
The client calls R_DnssrvOperation4 (section 3.1.4.16) and provides the following parameters:
DNS_RPC_CURRENT_CLIENT_VER (section 2.2.1.2.1) as the client version.
Zero as the settings flag.
A Unicode string containing the FQDN of the DNS server on which the virtualization instance is to be created.
Zero as the context.
CreateVirtualizationInstance as the operation.
DNSSRV_TYPEID_VIRTUALIZATION_INSTANCE as the type ID.
Create a DNS_RPC_VIRTUALIZATION_INSTANCE (section 2.2.17.1.1) structure with dwFlags as zero and pwszVirtualizationID as "example_vi1". Pass this structure as RPC data.
The DNS server returns ERROR_SUCCESS if the operation was successful or a Windows error code if the operation fails.