on warp-tls/3.1.5 help sign in
12 lines 329 B history raw
1#include <windows.h>
2#include <shellapi.h>
3#include <stdio.h>
5void launch(int port, char *s)
6{
7 int len = 8 + strlen("http://127.0.0.1:") + strlen(s);
8 char *buff = malloc(len);
9 _snprintf(buff, len, "http://127.0.0.1:%d/%s", port, s);
10 ShellExecute(NULL, "open", buff, NULL, NULL, SW_SHOWNORMAL);
11 free(buff);