Notice that SERVERNAME and DOMAIN name parameters are declared as Integers, not Strings, and are set to zero.
This is done to pass NULL values to the function instead of string values. In this case the local computer is used (SERVERNAME), and the function returns the name of the domain controller for the primary domain (DOMAIN).
Error 2453 means that your computer is not joined to domain. Use NetJoinDomain function or go through the network settings to join a domain.