# Utility packages for Windows: WinTypes.jl and WinKnownPaths.jl

**URL:** <https://discourse.julialang.org/t/utility-packages-for-windows-wintypes-jl-and-winknownpaths-jl/43835>\
**Category:** Package Announcements\
**Created:** [July 28, 2020, 7:34pm UTC](https://discourse.julialang.org/t/utility-packages-for-windows-wintypes-jl-and-winknownpaths-jl/43835 "2020-07-28T19:34:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [July 28, 2020, 7:34pm UTC](https://discourse.julialang.org/t/utility-packages-for-windows-wintypes-jl-and-winknownpaths-jl/43835/1 "2020-07-28T19:34:56Z")

</div>

Two simple utility packages for interacting with the Windows API:

# [WinTypes.jl](https://github.com/musm/WinTypes.jl)

This package defines aliases in Julia to [Windows Data types](https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types).

### Example

```julia
import WinTypes: HANDLE, DWORD

hOutput = ccall(:GetStdHandle, stdcall, HANDLE, (DWORD,), -11 % DWORD)

```

compare this to without using `WinTypes`:

```julia
hOutput = ccall(:GetStdHandle, stdcall, Ptr{Cvoid}, (UInt32,), STD_OUTPUT_HANDLE % UInt32)

```

# [WinKnownPaths.jl](https://github.com/musm/WinKnownPaths.jl)

This package allows you to reliably call known Windows paths identified by their UUID without having to make brittle calls to the system environment variables.

### Example

```julia
julia> using WinKnownPaths; import WinKnownPaths: FOLDERID

julia> WinKnownPaths.path(FOLDERID.System)
"C:\\WINDOWS\\system32"

julia> WinKnownPaths.path(FOLDERID.Fonts)
"C:\\WINDOWS\\Fonts"

```
