{"id":16832983,"url":"https://github.com/dbjdbj/dbj_atl_log_server","last_synced_at":"2025-08-22T17:05:04.266Z","repository":{"id":136463475,"uuid":"298276664","full_name":"DBJDBJ/dbj_atl_log_server","owner":"DBJDBJ","description":"WIP COM EXE Server","archived":false,"fork":false,"pushed_at":"2020-11-05T19:50:51.000Z","size":153,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T00:53:20.829Z","etag":null,"topics":["atl","cpp","win32com"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DBJDBJ.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-24T12:46:45.000Z","updated_at":"2020-11-05T19:50:53.000Z","dependencies_parsed_at":"2023-04-21T07:02:23.130Z","dependency_job_id":null,"html_url":"https://github.com/DBJDBJ/dbj_atl_log_server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DBJDBJ/dbj_atl_log_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DBJDBJ%2Fdbj_atl_log_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DBJDBJ%2Fdbj_atl_log_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DBJDBJ%2Fdbj_atl_log_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DBJDBJ%2Fdbj_atl_log_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DBJDBJ","download_url":"https://codeload.github.com/DBJDBJ/dbj_atl_log_server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DBJDBJ%2Fdbj_atl_log_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271672436,"owners_count":24800705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["atl","cpp","win32com"],"created_at":"2024-10-13T11:51:00.562Z","updated_at":"2025-08-22T17:05:04.212Z","avatar_url":"https://github.com/DBJDBJ.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e ATL COM Server 2020?! \u003c/h1\u003e\n\n- [1.1. Modus Operandi](#11-modus-operandi)\n  - [1.1.1. Knowledge Rules](#111-knowledge-rules)\n  - [1.1.2. How COM/RPC works](#112-how-comrpc-works)\n- [1.2. Usage](#12-usage)\n\nYes this is [ATL](https://docs.microsoft.com/en-us/cpp/atl/active-template-library-atl-concepts?view=vs-2019) indeed. It all started very innocently. I was experimenting with [cl /kernel](https://docs.microsoft.com/en-us/cpp/build/reference/kernel-create-kernel-mode-binary?view=vs-2019) switch. Trying all sorts of projects, from modern MS STL code, back to Win32. And then I wondered into my own code from pre 1998 (gasp!). Little I know it never worketh...\n\nThat was 24 hours ago. Which I spent refactoring, and making it work. It *seems* to work now. There is also a cpp client. Using `comdef.h` and the rest. \n\nBoth server and the client are [/kernel](https://docs.microsoft.com/en-us/cpp/build/reference/kernel-create-kernel-mode-binary?view=vs-2019) build.\n\nClient server communication over COM is working. Server is mainly without functionality of the logging. That is next.\n\n## 1.1. Modus Operandi\n\n[COM](https://en.wikipedia.org/wiki/Component_Object_Model) is based on [MSRPC](https://en.wikipedia.org/wiki/Microsoft_RPC). \n\n### 1.1.1. Knowledge Rules\n\nIt is critical you read those two Wikipedia articles first. Just after that take any direction you choose in gaining more knowledge about COM: paper books, ancient PDF's or whatever.\n\nAdvice: [MS DOCS](https://docs.microsoft.com/en-us/) (what was MSDN) is vast. It is actually much bigger and deeper than you think. It is also (more or less well) organized. But. There is no chronological ordering. You will never know are you diving into some 30 years old C++ or you are following (for example) Windows 10 RT (Run Time) library. Thing are all in there clumped together. And historical perspective is extremely important as most of still available technologies are deprecated or superseded. \n\nSo you better know are you barking to the wrong tree before you invest into climbing it. And for that I find Wikipedia priceless. Usually Wikipedia IT articles are written by very good people. With a lot of important historical perspective. Do understand we are here investigating complex technology pre dating StackOverflow escape hatch. Always start from WikiPedia.\n\n### 1.1.2. How COM/RPC works\n\n\u003ch2\u003e\u0026nbsp;\u003c/h2\u003e\n\n![rpc architecture diagram](https://docs.microsoft.com/en-us/windows/win32/rpc/images/prog-a11.png)\n\n\u003ch2\u003e\u0026nbsp;\u003c/h2\u003e\n\nLooks rather over elaborated. But that works and it works well. Local RPC calls are instantaneous. The whole Windows OS level, inter component communication layer (since NT) is based on MS RPC. \n\n[UNIX/Linux have nothing like RPC or COM](https://stackoverflow.com/a/3063712/10870835). There are disparate and competing solutions but it seems [D-Bus](https://en.wikipedia.org/wiki/D-Bus) has won.\n\n[Here is an \"better than average\" text](https://docs.microsoft.com/en-us/windows/win32/rpc/how-rpc-works) on MS DOCS about RPC architecture.\n\nCOM is an \"modern\" Object Oriented Architecture based on RPC.\n\n\u003ch3\u003e\u0026nbsp;\u003c/h3\u003e\n\n## 1.2. Usage\n\n\u003ch3\u003e\u0026nbsp;\u003c/h3\u003e\n\n\u003ch3\u003eWARNING! Do EVERYTHING as administrator\u003c/h3\u003e\n\n\u003ch3\u003e\u0026nbsp;\u003c/h3\u003e\n\n\u003e For client / server connection to be established the windows security is the roadblock. Please be sure both are running the administrator context. Including the VStudio sessions you use.\n\n\u003e From VStudio, before the client debugging session use \"Debug --\u003e Attach to process\" to check if `dbjatllog` is running.\n\n\u003ch2\u003e\u0026nbsp;\u003c/h2\u003e\n\n**Build and test**\n\nTwo separate solutions are provided, one for sever and one for client. You need to open two Visual Studio sessions. One with `server.sln` and the other with `client.sln`. Even better if you have two (or more) monitors. you keep them completely separate. Make sure you start the cmd.exe in admin mode.\n\n1. build the server\n   1. Debug build of the server has a lot of message box popup's.\n2. build the client\n3. start the server\n   1. On cmd line execute\n   2. `dbjatllog UnregServer RegServer` first, then\n       `dbjatllog` with no arguments.\n   5. Now server runs. \n   6. to stop the server you need to do `dbjatllog UnregServer` \n      1. Remember: Visual Studio Debug --\u003e Attach to process dialogue, will tell you if `dbjatllog` is running.\n4. start the client by starting the VS debug session. Follow that `log()` call\n   1. Remember: COM is based on RPC and calls are almost instantaneous. Just as if you are calling methods locally. Which means you need to implement asynchronous operation or locking on the server side, if required. \n   2. This is unlike sockets where things are inherently asynchronous. And slower.  Local COM (RPC) calls do not use networking at all. By 2020, AFAIK, local COM calls are all shared memory based.\n   \nYou can open another VStudio session and attach the debugger to the `dbjatllog` process. Place the break points inside methods to catch the COM message arrivals.\n\n\n---\n\n\u0026copy; 2020 by dbj@dbj.org -- LICENSE_DBJ -- https://dbj.org/license_dbj/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbjdbj%2Fdbj_atl_log_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbjdbj%2Fdbj_atl_log_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbjdbj%2Fdbj_atl_log_server/lists"}