| Ruby
    3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
    | 
 
 
 
Go to the documentation of this file.
    5 #define NTDDI_VERSION 0x06000000 
   10 w32error_make_error(
DWORD e)
 
   17 w32error_raise(
DWORD e)
 
   23 get_dns_server_list(
VALUE self)
 
   25     FIXED_INFO *fixedinfo = 
NULL;
 
   30     ret = GetNetworkParams(
NULL, &buflen);
 
   31     if (
ret != NO_ERROR && 
ret != ERROR_BUFFER_OVERFLOW) {
 
   35     ret = GetNetworkParams(fixedinfo, &buflen);
 
   36     if (
ret == NO_ERROR) {
 
   37         const IP_ADDR_STRING *ipaddr = &fixedinfo->DnsServerList;
 
   40             const char *s = ipaddr->IpAddress.String;
 
   42             if (strcmp(s, 
"0.0.0.0") == 0) 
continue;
 
   44         } 
while ((ipaddr = ipaddr->Next) != 
NULL);
 
   47     if (
ret != NO_ERROR) w32error_raise(
ret);
 
  
VALUE rb_define_module_under(VALUE outer, const char *name)
VALUE rb_define_module(const char *name)
VALUE rb_ary_push(VALUE ary, VALUE item)
#define rb_define_private_method(klass, mid, func, arity)
Defines klass#mid and makes it private.
unsigned char buf[MIME_BUF_SIZE]
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
VALUE rb_singleton_class(VALUE obj)
Returns the singleton class of obj.
VALUE rb_path2class(const char *)
#define rb_str_new_cstr(str)
VALUE rb_class_new_instance(int, const VALUE *, VALUE)
Allocates and initializes an instance of klass.