c++ Programming Glossary: getlasterror
How might I wrap the FindXFile-style APIs to the STL-style Iterator Pattern in C++? http://stackoverflow.com/questions/2531874/how-might-i-wrap-the-findxfile-style-apis-to-the-stl-style-iterator-pattern-in-c FindNext hFind currentData if success return DWORD error GetLastError if error ERROR_NO_MORE_FILES FindXFileFunctions_T Close hFind.. FindFirst pathSpec.c_str currentData if Valid GetLastError ERROR_PATH_NOT_FOUND GetLastError ERROR_FILE_NOT_FOUND WindowsApiException.. currentData if Valid GetLastError ERROR_PATH_NOT_FOUND GetLastError ERROR_FILE_NOT_FOUND WindowsApiException ThrowFromLastError..
how to get vendor id and product id of a plugged usb device on windows http://stackoverflow.com/questions/2935184/how-to-get-vendor-id-and-product-id-of-a-plugged-usb-device-on-windows DataT PBYTE buffer buffersize buffersize if GetLastError ERROR_INSUFFICIENT_BUFFER Change the buffer size. if buffer.. Number i is s n i buffer if buffer LocalFree buffer if GetLastError NO_ERROR GetLastError ERROR_NO_MORE_ITEMS Insert error handling.. if buffer LocalFree buffer if GetLastError NO_ERROR GetLastError ERROR_NO_MORE_ITEMS Insert error handling here. qDebug return..
How do I read from a version resource in Visual C++ http://stackoverflow.com/questions/316626/how-do-i-read-from-a-version-resource-in-visual-c MAX_PATH 0 TRACE GetModuleFileName failed with error d n GetLastError return false allocate a block of memory for the version info.. 0 TRACE GetFileVersionInfoSize failed with error d n GetLastError return false std vector BYTE data dwSize load the version info.. data 0 TRACE GetFileVersionInfo failed with error d n GetLastError return false get the name and version strings LPVOID pvProductName..
Windows threading: _beginthread vs _beginthreadex vs CreateThread C++ http://stackoverflow.com/questions/331536/windows-threading-beginthread-vs-beginthreadex-vs-createthread-c when an error occurs it can be checked by calling GetLastError ... but what are some things I should consider when I'm using..
How to get Process Name in C++ http://stackoverflow.com/questions/4570174/how-to-get-process-name-in-c the full path to the executable else You better call GetLastError here CloseHandle Handle return 0 share improve this answer..
How can I detect only deleted, changed, and created files on a volume? http://stackoverflow.com/questions/7421440/how-can-i-detect-only-deleted-changed-and-created-files-on-a-volume PAGE_READWRITE if buffer NULL printf VirtualAlloc u n GetLastError return mft_enum_data.StartFileReferenceNumber record ParentFileReferenceNumber.. bytecount NULL printf FSCTL_ENUM_USN_DATA show_record u n GetLastError return parent_record USN_RECORD USN buffer 1 if parent_record.. PAGE_READWRITE if buffer NULL printf VirtualAlloc u n GetLastError return 0 printf Opening volume. n drive CreateFile L c GENERIC_READ..
Check at Compile-Time if Template Argument is void http://stackoverflow.com/questions/9625526/check-at-compile-time-if-template-argument-is-void a template function to call the API function and then call GetLastError to retrieve any error it might have set. I could then pass this..
|