Skip to content

Instantly share code, notes, and snippets.

View DJm00n's full-sized avatar

Dimitriy Ryazantcev DJm00n

View GitHub Profile
@DJm00n
DJm00n / utf8.cpp
Last active November 19, 2019 11:58
#include <iostream>
#include <Windows.h>
int main()
{
SetConsoleCP(CP_UTF8);
SetConsoleOutputCP(CP_UTF8);
std::cout << "GetConsoleCP()=" << GetConsoleCP() << ", GetConsoleOutputCP()=" << GetConsoleOutputCP() << std::endl;
std::cout << "GetACP()=" << GetACP() << std::endl;
#include <iphlpapi.h>
struct iflist {
wchar_t name[50];
struct sockaddr_in sin;
int ifidx;
};
void getiflist(struct iflist *list, int *listLen)
{
@DJm00n
DJm00n / OpenSSL-1_1_0-stable-VS2015.md
Created January 9, 2018 12:46 — forked from terrillmoore/OpenSSL-1_1_0-stable-VS2015.md
Building OpenSSL 1.1.0 with Microsoft VS 2015

Building OpenSSL 1.1.0 with Microsoft VS 2015

MCCI needs OpenSSL for a Windows project (that will be cross-platform). A casual search didn't turn up either a good source for cross-platform libraries, which meant we have to build them ourselves. A deeper search found a detailed guide here, and yet the details don't match what I found when I checked out the code; and the post doesn't talk about doing it directly from GitHub (which I wanted to do).

Here's the procedure for building OpenSSL on 64-bit Windows 10, with Visual Studio 2015.

  1. If you don't have it, please install git bash from git-scm.com.
  2. Start a git bash window.

    In the following, I'll use lines beginning with {dir} $ to designate input to a bash Window. We'll also have to use a cmd.exe Window for much of the build, and those lines will be marked {dir}>, just as on Windows..