728x90

 

 

64비트 기반 프로그래밍

- 자료형에 대해서 고려해야 함

- LLP64, LP64 : 32비트 시스템과의 호환성을 중시한 모델

- 데이터 손실 고려해야 함

#include <stdio.h>

int main()
{
    int arr[10] = {0,};		// int* arr;
    int arrVal = (int)arr;	// 데이터 손실 발생 8Byte -> 4Byte
    printf("pointer : %d\n",arrVal);
    return 0;
}

- Polymorphic(다형성) 자료형

#if defined(_WIN64)
    typedef __int64 LONG_PTR;
    typedef unsigned __int64 ULONG_PTR;
    typedef __int64 INT_PTR;
    typedef unsigned __int64 UINT_PTR;
#else
    typedef long LONG_PTR;
    typedef unsigned long ULONG_PTR;
    typedef int INT_PTR;
    typedef unsigned int UINT_PTR;
#endif

오류의 확인

- GetLastError() : 오류가 발생된 이유를 확인

    -> 에러가 발생되면 바로 호출해야 함

    -> 에러가 발생하지 않으면 에러가 발생되지 않았다는 값이 저장됨

https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes

 

System Error Codes - Win32 apps

Error Codes In this article --> This section is intended for developers who are debugging system errors. If you reached this page while searching for other errors, here are some links that might help: More ways to find an error code We've listed the system

docs.microsoft.com

 

728x90

+ Recent posts