---
title: llarp::win32

---

# llarp::win32



## Classes

|                | Name           |
| -------------- | -------------- |
| class | **[llarp::win32::VPNPlatform](Classes/classllarp_1_1win32_1_1VPNPlatform.md)**  |
| class | **[llarp::win32::DLL](Classes/classllarp_1_1win32_1_1DLL.md)**  |
| class | **[llarp::win32::error](Classes/classllarp_1_1win32_1_1error.md)**  |
| class | **[llarp::win32::OneShotExec](Classes/classllarp_1_1win32_1_1OneShotExec.md)** <br>RAII wrapper for calling a subprocess in win32 for parallel executuion in the same scope destructor blocks until timeout has been hit of the execution of the subprocses finished.  |
| class | **[llarp::win32::DeferExec](Classes/classllarp_1_1win32_1_1DeferExec.md)** <br>a wrapper for [OneShotExec](Classes/classllarp_1_1win32_1_1OneShotExec.md) that calls the thing we want on destruction  |
| class | **[llarp::win32::WinDivert_API](Classes/classllarp_1_1win32_1_1WinDivert__API.md)**  |

## Functions

|                | Name           |
| -------------- | -------------- |
| std::string | **[error_to_string](Namespaces/namespacellarp_1_1win32.md#function-error-to-string)**(DWORD err) |
| void | **[Exec](Namespaces/namespacellarp_1_1win32.md#function-exec)**(std::string exe, std::string args)<br>simple wrapper to run a single command in a blocking way  |
| template <typename Data \> <br>GUID | **[MakeDeterministicGUID](Namespaces/namespacellarp_1_1win32.md#function-makedeterministicguid)**(Data data)<br>given a container of data hash it and make it into a GUID so we have a way to deterministically generate GUIDs  |
| void | **[ensure_handle_is_valid](Namespaces/namespacellarp_1_1win32.md#function-ensure-handle-is-valid)**(HANDLE h) |
| std::shared_ptr< WintunContext > | **[WintunContext_new](Namespaces/namespacellarp_1_1win32.md#function-wintuncontext-new)**() |
| std::shared_ptr< [vpn::NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) > | **[WintunInterface_new](Namespaces/namespacellarp_1_1win32.md#function-wintuninterface-new)**(const std::shared_ptr< WintunContext > & , const [vpn::InterfaceInfo](Classes/structllarp_1_1vpn_1_1InterfaceInfo.md) & info, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * router)<br>makes a new vpn interface with a wintun context given info and a router pointer  |


## Functions Documentation

### function error_to_string

```cpp
std::string error_to_string(
    DWORD err
)
```


### function Exec

```cpp
void Exec(
    std::string exe,
    std::string args
)
```

simple wrapper to run a single command in a blocking way 

### function MakeDeterministicGUID

```cpp
template <typename Data >
inline GUID MakeDeterministicGUID(
    Data data
)
```

given a container of data hash it and make it into a GUID so we have a way to deterministically generate GUIDs 

### function ensure_handle_is_valid

```cpp
inline void ensure_handle_is_valid(
    HANDLE h
)
```


### function WintunContext_new

```cpp
std::shared_ptr< WintunContext > WintunContext_new()
```


### function WintunInterface_new

```cpp
std::shared_ptr< vpn::NetworkInterface > WintunInterface_new(
    const std::shared_ptr< WintunContext > & ,
    const vpn::InterfaceInfo & info,
    AbstractRouter * router
)
```

makes a new vpn interface with a wintun context given info and a router pointer 





-------------------------------

Updated on 2022-09-10 at 18:17:15 +0000