{"id":20417022,"url":"https://github.com/smourier/outofprocesscomserver","last_synced_at":"2025-09-24T05:32:07.009Z","repository":{"id":185821007,"uuid":"674092547","full_name":"smourier/OutOfProcessCOMServer","owner":"smourier","description":"An ATL C++ Out-Of-Process COM server and clients (C++, .NET, VBscript) sample.","archived":false,"fork":false,"pushed_at":"2025-01-04T11:49:19.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-04T12:40:42.519Z","etag":null,"topics":["atl","com","out-of-proc-server","visual-studio"],"latest_commit_sha":null,"homepage":"","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/smourier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-08-03T06:02:29.000Z","updated_at":"2025-01-04T11:49:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"da907d4e-d20b-436c-aa16-157c1bac36f3","html_url":"https://github.com/smourier/OutOfProcessCOMServer","commit_stats":null,"previous_names":["smourier/outofprocesscomserver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smourier%2FOutOfProcessCOMServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smourier%2FOutOfProcessCOMServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smourier%2FOutOfProcessCOMServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smourier%2FOutOfProcessCOMServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smourier","download_url":"https://codeload.github.com/smourier/OutOfProcessCOMServer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234045618,"owners_count":18770975,"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","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","com","out-of-proc-server","visual-studio"],"created_at":"2024-11-15T06:24:11.998Z","updated_at":"2025-09-24T05:32:06.628Z","avatar_url":"https://github.com/smourier.png","language":"C++","readme":"# OutOfProcessCOMServer\nAn ATL C++ Out-Of-Process COM server and clients (C++, .NET, VBscript) sample.\n\nThe **OutOfProcessCOMServer** project is the COM server executable. It has been created using Visual Studio's ATL wizard and an \"ATL Simple Object\" item has been added (renamed as \"Mouse\").\n\nKey points:\n\n* The *IMouse* dual (*IUnknown-derived* + *IDispatch*) interface methods were added manually.\n* The *IKeyboard* *IUnknown-derived* interface was added manually in *OutOfProcessCOMServer.idl* and was also added to the list of interfaces the *CMouse* class implements (in Mouse.h). For demonstration purposes, *IKeyboard* uses a non-OLE-automation type (the Windows LPCWSTR type), which needs proper marshaling.\n* Both *IMouse* and *IKeyboard* have been simply implemented (in *Mouse.h*).\n* Building (MIDL) create (among other files) a *OutOfProcessCOMServer.tlb* (Type Library) file needed for the .NET client.\n* Self-registration was removed from config so Visual Studio doesn't need to run as admin.\n* The server starts and shutdowns automatically (ATL does that).\n* It must be registered (with admin rights) with `OutOfProcessCOMServer.exe /regserver`.\n* It can be unregistered (with admin rights) with `OutOfProcessCOMServer.exe /unregserver`.\n\n\n\nThe **OutOfProcessCOMServerPS** project is the Proxy/Stub dll for the OutOfProcessCOMServer COM server. It's only needed for the *IKeyboard* interface which is an *IUnknown-derived* interface (not *IDispatch*, not dual) which needs to be proxied and marshaled since it's not dual nor OLE-Automation and not using OLE-Automation compatible types. When using only interfaces like *IMouse*, this project is not needed at all.\n\nKey points:\n\n* It has not been created by Visual Studio automatically, the project was created from an empty DLL project.\n\n* it references ATL-generated files *xdlldata.c*, *xdlldata.h*, *OutOfProcessCOMServer_i.c*, *OutOfProcessCOMServer_p.c* from the OutOfProcessCOMServer  project.\n* the *OutOfProcessCOMServerPS.def* file has been added manually to export standard COM functions so the DLL can be registered/unregistered.\n* It must be registered (with admin rights) with `regsvr32 OutOfProcessCOMServerPS.dll`\n* It can be unregistered (with admin rights) with `regsvr32 /u OutOfProcessCOMServerPS.dll`\n\n\n\nThe **Client** project is a C++ client (using ATL). It includes OutOfProcessCOMServer project's MIDL-generated files for IIDs and CLSIDs definitions.\n\n\n\nThe **NetCoreClient** project is a .NET 8.0 client project. It references the .TLB (by it's LIBID so it must exist before this project can compile) generated by OutOfProcessCOMServer project's MIDL pass. It can access *IMouse* and *IKeyboard*.\n\n\n\nThe **VBScriptClient.vbs** is a VBScript file. It can only access *IMouse* since VBScript only supports OLE-Automation interfaces.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmourier%2Foutofprocesscomserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmourier%2Foutofprocesscomserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmourier%2Foutofprocesscomserver/lists"}