OutputDebugString

  • Windows 환경에서 제공되는 디버그 출력 함수

  • <Windows.h> 헤더에 포함

    #include <windows.h>
    #include <string>
    
    int main() {
        OutputDebugString(TEXT("Hello, Debug World!"));
        OutputDebugString(L"Hello");
        std::wstring ws = L"WString" + std::to_string({변수});
        OutputDebugString(ws);
        return 0;
    }
  • print처럼 포맷 적용하는 법 : https://blog.codingcat.kr/76

FAILED

  • 결과를 HRESULT 타입으로 반환
  • 코드 실행이 정상적으로 되었는지 비교할 떄 사용
    • 쉐이더 파일 내부 오류는 제대로 인지 불가
      if (FAILED(walkImage->Init(
        TEXT("Image/iori_walk.bmp"), 612, 104)))
      {
            MessageBox(g_hWnd, TEXT("파일 로드에 실패"), TEXT("경고"), MB_OK);
      }
  • 주요 HRESULT 값들

    • 성공(Success):
      • S_OK (값: 0): 작업이 성공적으로 완료됨.
      • S_FALSE (값: 1): 작업은 성공했으나 추가 정보가 제공됨.
    • 실패(Failure):
      • E_FAIL (값: 0x80004005): 일반적인 실패.
      • E_INVALIDARG (값: 0x80070057): 잘못된 인수.
      • E_OUTOFMEMORY (값: 0x8007000E): 메모리 부족.

'프레임워크 > WinAPI' 카테고리의 다른 글

기본 개념 및 함수  (0) 2025.03.14
애니메이션  (0) 2025.03.14

+ Recent posts

let textNodes = document.querySelectorAll("div.tt_article_useless_p_margin.contents_style > *:not(figure):not(pre)"); textNodes.forEach(function(a) { a.innerHTML = a.innerHTML.replace(/`(.*?)`/g, '$1'); });