diff --git a/NTwain.sln b/NTwain.sln index 68e8c2e..3bfe1f6 100644 --- a/NTwain.sln +++ b/NTwain.sln @@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{4CE0B9ED-2CD1-440F-B4EC-35ECA6D61EFE}" ProjectSection(SolutionItems) = preProject LICENSE.txt = LICENSE.txt + size-test\main.cpp = size-test\main.cpp README.md = README.md twain-doc\TWAIN-2.4-Specification.pdf = twain-doc\TWAIN-2.4-Specification.pdf twain-doc\twain2.4.h = twain-doc\twain2.4.h diff --git a/size-test/main.cpp b/size-test/main.cpp new file mode 100644 index 0000000..84b6e66 --- /dev/null +++ b/size-test/main.cpp @@ -0,0 +1,31 @@ +// code block to verify size of things on different platforms and archtectures + +#include "twain.h" + +int main() +{ + bool is32 = sizeof(void*) == 4; + bool is64 = sizeof(void*) == 8; + std::cout << (is32 ? "32bit= " : "") << (is64 ? "64bit" : "") << std::endl; + std::cout << std::endl; + std::cout << "TW_STR32 = " << sizeof TW_STR32 << std::endl; + std::cout << "TW_STR64 = " << sizeof TW_STR64 << std::endl; + std::cout << "TW_STR128 = " << sizeof TW_STR128 << std::endl; + std::cout << "TW_STR255 = " << sizeof TW_STR255 << std::endl; + std::cout << std::endl; + std::cout << "TW_INT8 = " << sizeof TW_INT8 << std::endl; + std::cout << "TW_INT16 = " << sizeof TW_INT16 << std::endl; + std::cout << "TW_INT32 = " << sizeof TW_INT32 << std::endl; + std::cout << "TW_UINT8 = " << sizeof TW_UINT8 << std::endl; + std::cout << "TW_UINT16 = " << sizeof TW_UINT16 << std::endl; + std::cout << "TW_UINT32 = " << sizeof TW_UINT32 << std::endl; + std::cout << "TW_BOOL = " << sizeof TW_BOOL << std::endl; + std::cout << std::endl; + std::cout << "TW_HANDLE = " << sizeof TW_HANDLE << std::endl; + std::cout << "TW_MEMREF = " << sizeof TW_MEMREF << std::endl; + std::cout << "TW_UINTPTR= " << sizeof TW_UINTPTR << std::endl; + std::cout << std::endl; + std::cout << "TW_IDENTITY = " << sizeof TW_IDENTITY << std::endl; + int test; + std::cin >> test; +}