Programming311 Dialog 생성 AfxBeginThread 이용 Thread 호출 예제 입니다. Thread는 계속 반복 하지 않고 , OnInitDialog가 호출 된 후 한번 만 실행되도록 테스트 하였습니다. ex) CPrinterSetDlg.hpublic: CWinThread* m_pThread; static UINT ThreadFunction(LPVOID _mothod); virtual BOOL OnInitDialog(); ex) CPrinterSetDlg.h/// /// AfxBeginThread를 이용하여 Thread를 생성 하고 호출 합니다./// /// BOOL CPrinterSetDlg::OnInitDialog(){ CDialogEx::OnInitDialog(); // TODO: 여기에 추가 초기화 작업을 추가합니다. m_pThread = AfxBeginThread(ThreadF.. 2024. 11. 9. [MFC Console] HwpAutomation을 이용한 Print 진행 예제 입니다. [MFC Console] HwpAutomation을 이용한 Print 진행 예제 입니다. 출처 : https://developer.hancom.com/hwpautomation Hwp 파일에 대하여 오픈 메서드를 호출 할때 마다 보안승인을 하겠냐는 메시지 박스가 발생 하는 부분에 대하여 ,보안 승인 모듈에 대하여 Registry에 등록되어있는지 여부를 체크 하고 등록되어 있지 않다면 등록 시도 하게 끔 하였습니다.#include "pch.h"#include "framework.h"#include #include #include #include "CHwpObject.h"#include "CAction.h"#include "CParameterSet.h"#include "CSet.h"#include "CPrin.. 2024. 10. 20. node net.connect를 이용하여 Blocking TCP Socket Message Send, Receive 테스트 진행 nest.js 가 클라이언트인 상황으로 , TCP Socket을 Listening을 하고 있는 서버에 메시지 전송 예제 입니다. 1. nestjs Client class 작성 진행import { Logger } from "@nestjs/common";export class TcpClient { static logger = new Logger(TcpClient.name); static net = require('net'); static initTcpConnection() { const client = new this.net.Socket(); let result; client.connect(35000 , 'localhost' , (data : stri.. 2024. 10. 9. SHA256 암호화 알고리즘으로 Text 암호화 예제 (1) 암호화 역할 함수를 작성 하였습니다.//test.encrypt.helper.tsexport class TestEncryptHelper { static async encrypt(password: string): Promise { const { createHash } = require('crypto'); return createHash('sha256').update(`${password}[SaltValue]`).digest('hex'); }} (2) 단위 테스트를 진행해보기 위하여 작성 하였습니다.//test.encrypt.helper.spec.tsimport { TestEncryptHelper } from './test.encrypt.helper' describe('encryptTes.. 2024. 9. 30. 이전 1 2 3 4 5 6 7 ··· 78 다음