{"id":21561056,"url":"https://github.com/end2endzone/liblnk","last_synced_at":"2026-03-12T05:32:47.328Z","repository":{"id":65633254,"uuid":"120932224","full_name":"end2endzone/libLNK","owner":"end2endzone","description":"libLNK is a c++ library for creating Windows shortcuts (*.lnk files)","archived":false,"fork":false,"pushed_at":"2018-04-21T00:21:09.000Z","size":585,"stargazers_count":27,"open_issues_count":5,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-19T06:50:04.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/end2endzone.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-09T16:58:28.000Z","updated_at":"2025-06-13T08:25:57.000Z","dependencies_parsed_at":"2023-02-01T18:31:27.814Z","dependency_job_id":null,"html_url":"https://github.com/end2endzone/libLNK","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/end2endzone/libLNK","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/end2endzone%2FlibLNK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/end2endzone%2FlibLNK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/end2endzone%2FlibLNK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/end2endzone%2FlibLNK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/end2endzone","download_url":"https://codeload.github.com/end2endzone/libLNK/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/end2endzone%2FlibLNK/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30416310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T04:41:02.746Z","status":"ssl_error","status_checked_at":"2026-03-12T04:40:12.571Z","response_time":114,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T09:18:37.967Z","updated_at":"2026-03-12T05:32:47.304Z","avatar_url":"https://github.com/end2endzone.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![libLNK logo](https://github.com/end2endzone/libLNK/raw/master/docs/libLNK-splashscreen.png)\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Github Releases](https://img.shields.io/github/release/end2endzone/libLNK.svg)](https://github.com/end2endzone/libLNK/releases)\n[![Build status](https://ci.appveyor.com/api/projects/status/yiohs75vn2h6s4sw/branch/master?svg=true)](https://ci.appveyor.com/project/end2endzone/libLNK/branch/master)\n[![Tests status](https://img.shields.io/appveyor/tests/end2endzone/libLNK/master.svg)](https://ci.appveyor.com/project/end2endzone/libLNK/branch/master/tests)\n\nAppVeyor build statistics:\n\n[![Build statistics](https://buildstats.info/appveyor/chart/end2endzone/libLNK)](https://ci.appveyor.com/project/end2endzone/libLNK/branch/master)\n\n\n# libLNK\n\nlibLNK is a c++ library for creating Windows shortcuts (*.lnk files).\n\nIt's main features are:\n\n*  Supports shortcuts created by Windows XP and over.\n*  Create new shortcuts or read properties of an existing shortcuts.\n*  Support the following shotcut properties:\n   *  target (path to file or folder)\n   *  arguments\n   *  working directory (start in)\n   *  hot key (shortcut key)\n   *  window mode (normal, minimized or maximized)\n   *  description (comments)\n   *  icon\n\n# Background\n\nlibLNK was first released in XXXX. At the time, there were not much documentation of the format that was widely available. \n\nThe following links are references that were available at the time of the first public release:\n* [http://www.stdlib.com/art6-Link-File-Format-lnk.html](http://www.stdlib.com/art6-Link-File-Format-lnk.html)\n* [http://www.wotsit.org/list.asp?search=lnk](http://www.wotsit.org/list.asp?search=lnk)\n\nlibLNK implementation is a reverse engineering process to identify how the file format is working. \n\nNote that the Shell Link (.LNK) binary file format is now properly documented and can be found on [MSDN](https://msdn.microsoft.com/en-us/library/dd871305.aspx).\n\n\n# Usage\n\nThe library publishes multiple functions in the '*lnk*' namespace. Each function is self explanatory to manipulate the Windows Shortcut binary file format:\n\n```cpp\nbool isLink(const unsigned char * iBuffer, const unsigned long \u0026 iSize); \nbool getLinkInfo(const char * iFilePath, LinkInfo \u0026 oLinkInfo); \nbool createLink(const char * iFilePath, const LinkInfo \u0026 iLinkInfo); \nstd::string getLinkCommand(const char * iFilePath); \n```\n                            \nThe library also publishes debuging API functions:\n```cpp\nconst char * getVersionString(); \nbool printLinkInfo(const char * iFilePath); \n```\n\n# Example\n\n### Create shortcut:\nThe following example creates a shortcut to the '*History.txt*' file of [7-Zip](http://www.7-zip.org/download.html). The file is located in '*C:\\Program Files\\7-Zip\\History.txt*'.\n\n```cpp\nlnk::LinkInfo info;\ninfo.target = \"C:\\\\Program Files\\\\7-Zip\\\\History.txt\";\ninfo.arguments = \"\";\ninfo.description = \"manual shortcut created by libLNK library\";\ninfo.workingDirectory = \"C:\\\\Program Files\\\\7-Zip\";\ninfo.customIcon.filename = \"%SystemRoot%\\\\system32\\\\SHELL32.dll\";\ninfo.customIcon.index = 101; //empty recycle bin icon\ninfo.hotKey = lnk::LNK_NO_HOTKEY;\n\nconst char * linkFilename = \"Shortcut to 7-zip History.txt.lnk\";\nbool success = lnk::createLink(linkFilename, info);\n```\n\n### Read shortcut properties\nThe following example read properties of the '*Calculator*' shortcut of the '*Start Menu*'.\n\n```cpp\nlnk::LinkInfo info;\nbool success = lnk::getLinkInfo(\"C:\\\\Users\\\\All Users\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Accessories\\\\Calculator.lnk\", info);\nprintf(\"target=%s\\n\", info.target.c_str());\nprintf(\"network path=%s\\n\", info.networkPath.c_str());\nprintf(\"arguments=%s\\n\", info.arguments.c_str());\nprintf(\"description=%s\\n\", info.description.c_str());\nprintf(\"workingDirectory=%s\\n\", info.workingDirectory.c_str());\nprintf(\"icon.filename=%s\\n\", info.customIcon.filename.c_str());\nprintf(\"icon.index=%d\\n\", info.customIcon.index);\n```\n\nOutputs:\n\n```\ntarget=%windir%\\system32\\calc.exe\nnetwork path=\narguments=\ndescription=Performs basic arithmetic tasks with an on-screen calculator.\nworkingDirectory=\nicon.filename=%windir%\\system32\\calc.exe\nicon.index=0\n```\n\n# !!!ICI!!!\nhttps://github.com/end2endzone/libLNK/blob/master/src/libLNK_unittest/TestLNK.cpp\nhttps://github.com/libyal/liblnk/wiki/Building\n\n### Command:\n```batchfile\nlibLNK.exe --file=html5skeleton.html --output=.\\outdir --headerfile=resourcehtml5skeleton.h\n            --identifier=HtmlSample --chunksize=50\n```\n\n# Installing\n\nPlease refer to file [INSTALL.md](INSTALL.md) for details on how installing/building the application.\n\n## Testing\nlibLNK comes with unit tests which tests for multiple combinations to validate the integrity of the library with multiple operating systems.\n\nTest are build using the Google Test v1.6.0 framework. For more information on how googletest is working, see the [google test documentation primer](https://github.com/google/googletest/blob/release-1.8.0/googletest/docs/V1_6_Primer.md).  \n\nTest are automatically build when building the solution. Please see the '*build step*' section for details on how to build the software.\n\nTest can be executed from the following two locations:\n\n1) From the Visual Studio IDE:\n   1) Select the project '*libLNK_unittest*' as StartUp project.\n   2) Hit CTRL+F5 (Start Without Debugging)\n2) From the output binaries folder:\n   1) Open a file navigator and browse to the output folder(for example c:\\projects\\libLNK\\cmake\\build\\bin\\Release)\n   2) Run the '*libLNK_unittest.exe*' executable.\n\nSee also the latest test results at the beginning of the document.\n\n# Compatible with\n\nlibLNK is only available for the Windows platform and has been tested with the following version of Windows:\n\n*   Windows XP\n*   Windows 7\n\n# Versioning\n\nWe use [Semantic Versioning 2.0.0](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/end2endzone/libLNK/tags).\n\n# Authors\n\n* **Antoine Beauchamp** - *Initial work* - [end2endzone](https://github.com/end2endzone)\n\nSee also the list of [contributors](https://github.com/end2endzone/libLNK/blob/master/AUTHORS) who participated in this project.\n\n# License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fend2endzone%2Fliblnk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fend2endzone%2Fliblnk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fend2endzone%2Fliblnk/lists"}