Skip to content

Instantly share code, notes, and snippets.

View HeiSir2014's full-sized avatar
🏠
Working from home

heisir HeiSir2014

🏠
Working from home
View GitHub Profile
@HeiSir2014
HeiSir2014 / CStringCode StringCode.cpp
Last active December 13, 2022 06:40
C++ String Windows下操作 UNICODE <-> Ansi GBK <->UTF8
#include "stdafx.h"
#include <Windows.h>
#include "StringCode.h"
using namespace std;
CStringCode::CStringCode()
{
}
@HeiSir2014
HeiSir2014 / SynSemaphore.cpp
Created April 2, 2018 07:33
Windows 同步信号量 SynSemaphore
#include "SynSemaphore.h"
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif // !WIN32_LEAN_AND_MEAN
#include <Windows.h>
CSynSemaphore::CSynSemaphore()
{
m_nHandle = (int)CreateSemaphore(NULL, 0, 1, NULL);
@HeiSir2014
HeiSir2014 / ConvertImage.cpp
Created April 2, 2018 07:40
GDIPlus ConvertImage BMP->JPG JPG->BMP BMP->PNG PNG->BMP
#include "stdafx.h"
#include "ConvertImage.h"
#pragma comment(lib,"gdiplus")
CConvertImage::CConvertImage()
{
}
@HeiSir2014
HeiSir2014 / sha1.h
Created April 8, 2018 09:25
sha1 算法
#ifndef MERAK_SHA_SHA1_H_
#define MERAK_SHA_SHA1_H_
#include <string.h>
namespace Merak {
namespace sha {
#define SHA_ROTATE(X,n) (((X) << (n)) | ((X) >> (32-(n))))
struct SHA_CTX;