Skip to content

Instantly share code, notes, and snippets.

View yuk7's full-sized avatar
🐈
?uwu=true

yuk7 yuk7

🐈
?uwu=true
View GitHub Profile

Keybase proof

I hereby claim:

  • I am yuk7 on github.
  • I am yuk7 (https://keybase.io/yuk7) on keybase.
  • I have a public key ASBNgw1dfZlc4bHEdyPdle9_td-0ZtE95bxBgF8s1MTpaQo

To claim this, I am signing this object:

@yuk7
yuk7 / wslapi_Reg_test.c
Created October 17, 2017 04:18
WSL API Test code for Register Distribution. Windows 10 64bit FCU or later only. I tested with mingw-w64 64bit gcc
#include <stdio.h>
#include <windows.h>
typedef int (WINAPI *FUNC)(PCWSTR,PCWSTR);
int main()
{
HMODULE hmod;
FUNC func;
@yuk7
yuk7 / wslapi.ps1
Last active June 5, 2023 10:48
Windows 10(FCU or later) WSL API on PowerShell
$wslapi = &{
$wsldll = @'
[DllImport("wslapi.dll", CharSet = CharSet.Ansi)]
public static extern bool WslIsDistributionRegistered(
[MarshalAs(UnmanagedType.LPWStr)]string distributionName);
[DllImport("wslapi.dll", CharSet = CharSet.Ansi)]
public static extern uint WslUnregisterDistribution(
[MarshalAs(UnmanagedType.LPWStr)]string distributionName);