Title: getFileId() error in windows docker container · Issue #583 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: getFileId() error in windows docker container · Issue #583 · cppcheck-opensource/simplecpp
X Title: getFileId() error in windows docker container · Issue #583 · cppcheck-opensource/simplecpp
Description: We are using cppcheck in a Windows Docker container (windowsservercore-20H2) and have noticed that the function simplecpp::FileDataCache::getFileId() does not work. This is because the Windows API function GetFileInformationByHandleEx is...
Open Graph Description: We are using cppcheck in a Windows Docker container (windowsservercore-20H2) and have noticed that the function simplecpp::FileDataCache::getFileId() does not work. This is because the Windows API ...
X Description: We are using cppcheck in a Windows Docker container (windowsservercore-20H2) and have noticed that the function simplecpp::FileDataCache::getFileId() does not work. This is because the Windows API ...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/583
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"getFileId() error in windows docker container","articleBody":"We are using cppcheck in a Windows Docker container (windowsservercore-20H2) and have noticed that the function ``simplecpp::FileDataCache::getFileId()`` does not work.\n\nThis is because the Windows API function ``GetFileInformationByHandleEx`` is not available in the Docker container (Error 50: ERROR_NOT_SUPPORTED). We also tested this on windowsservercore-ltsc2025, but the problem persists there as well.\nBecause of this problem, cppcheck cannot find files and therefore does not work.\n\nHowever, it works when using the simpler API function ``GetFileInformationByHandle`` (without **Ex**).\nHere is my fix for the problem:\n```cpp\n#ifdef DOCKER\n// New implementation\n BY_HANDLE_FILE_INFORMATION fileInfo;\n const BOOL ret = GetFileInformationByHandle(hFile, \u0026fileInfo);\n if (ret) {\n id.fileIdInfo.VolumeSerialNumber = static_cast\u003cstd::uint64_t\u003e(fileInfo.dwVolumeSerialNumber);\n id.fileIdInfo.FileId.IdentifierHi = static_cast\u003cstd::uint64_t\u003e(fileInfo.nFileIndexHigh);\n id.fileIdInfo.FileId.IdentifierLo = static_cast\u003cstd::uint64_t\u003e(fileInfo.nFileIndexLow);\n }\n#else\n// Old implementation\n const BOOL ret = GetFileInformationByHandleEx(hFile, FileIdInfo, \u0026id.fileIdInfo, sizeof(id.fileIdInfo));\n#endif\n```\n\nThe problem can also be reproduced using testrunner.exe.","author":{"url":"https://github.com/willenbr24","@type":"Person","name":"willenbr24"},"datePublished":"2025-11-04T07:32:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":22},"url":"https://github.com/583/simplecpp/issues/583"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e614d13f-9043-9e8b-c817-0085dbbf4556 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 895A:34DA5A:72E2FC:9C3DD7:6A4EC3D5 |
| html-safe-nonce | 636b248cbd6613ab2e3165f9579845a5f4690d60ddc1d3e15f0853e57d39d368 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTVBOjM0REE1QTo3MkUyRkM6OUMzREQ3OjZBNEVDM0Q1IiwidmlzaXRvcl9pZCI6IjQxNjI4MTc4MzcwNTQ3Mzk0MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e5c8130575733ddadd1bb7dd0464926e4f02fde25c495ff962a8731c9be018d6 |
| hovercard-subject-tag | issue:3585101331 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cppcheck-opensource/simplecpp/583/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c5f8829b3a887ea5f8818f72493d288f33f33e642bb9b7f9f0a33437f931a0bf/cppcheck-opensource/simplecpp/issues/583 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c5f8829b3a887ea5f8818f72493d288f33f33e642bb9b7f9f0a33437f931a0bf/cppcheck-opensource/simplecpp/issues/583 |
| og:image:alt | We are using cppcheck in a Windows Docker container (windowsservercore-20H2) and have noticed that the function simplecpp::FileDataCache::getFileId() does not work. This is because the Windows API ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | willenbr24 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/cppcheck-opensource/simplecpp git https://github.com/cppcheck-opensource/simplecpp.git |
| octolytics-dimension-user_id | 278097703 |
| octolytics-dimension-user_login | cppcheck-opensource |
| octolytics-dimension-repository_id | 33434464 |
| octolytics-dimension-repository_nwo | cppcheck-opensource/simplecpp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33434464 |
| octolytics-dimension-repository_network_root_nwo | cppcheck-opensource/simplecpp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width