분류 전체보기
MFC 프로젝트 버전 일괄 변경 툴
changeVer MFC 프로젝트가 여러개 일때, 버전 변경을 일일이 수정하는 것이 번거롭습니다. 이럴때, 버전을 일괄적으로 변경해 주는 툴입니다. 원리는, 설정 파일에 리소스파일 경로를 넣어둔 목록을 만들고 툴에서 파일 목록을 읽어서 아규먼트로 받은 버전으로 일괄 치환 합니다. Visual Studio 2015 C# ( .NET Framework 4.5.2 ) 기반에서 코딩해 봤습니다. 자세한 내용은 github에 올린 내용으로 대체 합니다. ( https://github.com/lmk/changeVer ) Enveroment Virsual Studio 2015 C# Help Usage> $ changeVer.exe -f FileVersion -p ProductVersion -c ConfigFilena..
Simple Http Server
SimpleHttpServer 자세한 소스는 github을 참고하세요. https://github.com/lmk/SimpleHttpServer very simple http server default port: 8080 modify source here support: linux g++ 4.9.2 How to use block server HttpServer httpServer; httpServer.Init(5, NULL); httpServer.Run(); non-block NBHttpServer* httpServer = NBHttpServer::getInstance(); httpServer->Init(5); httpServer->Start(); sleep(60); httpServer->Stop();
OpenSSL 을 사용한 RSA
RSA 프로젝트를 진행하면서, github에 정리한 내용입니다. https://github.com/lmk/HowToUseOpenSSL/blob/master/RAS.md RSA 생성 PEM public 키로 RSA 생성하기 unsigned char *key = "PEM 형식의 public 키"; BIO *bio = BIO_new_mem_buf(key, -1); RSA *rsa = PEM_read_bio_RSA_PUBKEY(bio, &rsa, NULL, NULL);PEM private 키로 RSA 생성하기 unsigned char *key = "PEM 형식의 private 키"; BIO *bio = BIO_new_mem_buf(key, -1); RSA *rsa = PEM_read_bio_RSAPrivateK..
Code Finder
Code Finder 개요 C/C++ 해더 파일에 enum 또는 define 되어 있는 상수명을 파싱해서 검색해줍니다. ReactJS를 스터디 하기 위해 시작했습니다. C/C++ 해더 파서는 https://github.com/lmk/c_define_parser 를 사용 했습니다. 원본 소스: https://github.com/lmk/code_finder 설치 git clone https://github.com/lmk/code_finder.git cd code_finder npm install npm run build실행 npm run start 웹브라우져를 연다. http://localhost:3000/ 내 해더 파일을 사용하는 방법 /build/config.json 파일을 수정합니다. { "list":..
C 상수 파서
아주 오래전에 만들어 놓은 것을 github에 올리면서 readme 파일을 작성했습니다. 개요 c 헤더 파일을 파싱해서 '#define', 'enum' 구문으로 정의된 값, 상수명을 검색합니다. 원본: https://github.com/lmk/c_define_parser 사용법 error.h 파일의 내용이 아래와 같을 때 #define ERROR_NONE 0x00 #define ERROR_LOGIN 0x01 #define ERROR_FILE 0x02 #define ERROR_DEVICE 0x03 파라미터로 1을 입력하면 ERROR_LOGIN을 찾아줍니다 $ find_const.py 1 1 is ERROR_LOGIN 구현 로직 모든 파일을 머지한다. 주석을 제거한다. enum ..
python에서 ctype을 이용한 c library 연동 예제
python의 ctype 모듈을 이용해서 visual c++로 작성한 동적 dll을 읽는 sample 코드 입니다.소스 코드 설명/vc/test_dll: 동적 dll 코드 입니다.SET_VALUE: int 형 값을 저장합니다.GET_VALUE: 저장한 int형 값을 읽어 옵니다.SET_CALLBACK: 함수 포인터를 저장합니다. python으로 코딩한 함수를 넘길 것 입니다.RUN_CALLBACK: 저장한 함수 포인터에 정수형 값을 넘겨 실행 합니다. 실행하면 python함수가 실행될 것 입니다.SET_CLASS_CALLBACK: c++ class를 사용해서 함수 포인터를 저정합니다.RUN_CLASS_CALLBACK: c++ class를 사용해서 저장한 함수 포인터를 실행합니다.SET_THREAD_CAL..