Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › zig › WindowsSdk › Installation › find Private Function find Doc Source Private Function std.zig.WindowsSdk.Installation.find
fn find (
gpa : Allocator ,
io : Io ,
registry : *Registry ,
roots_key : Registry .Key ,
roots_subkey : []const u16 ,
prefix : []const u8 ,
version_key_name : []const u16 ,
) error Params File zig/WindowsSdk.zig: 464
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485 fn find (
gpa : Allocator ,
io : Io ,
registry : *Registry ,
roots_key : Registry .Key ,
roots_subkey : []const u16 ,
prefix : []const u8 ,
version_key_name : []const u16 ,
) error { OutOfMemory , InstallationNotFound , PathTooLong , VersionTooLong }!Installation {
roots : {
const installation = findFromRoot (gpa , io , roots_key , roots_subkey , prefix ) catch
break :roots ;
if (installation .isValidVersion (roots_key )) return installation ;
installation .free (gpa );
}
{
const installation = try findFromInstallationFolder (gpa , registry , version_key_name );
if (installation .isValidVersion (roots_key )) return installation ;
installation .free (gpa );
}
return error .InstallationNotFound ;
}
Find path and version of Windows SDK. Caller owns the result's fields.