Coder Social home page Coder Social logo

com_samples's Introduction

COM examples

COM Examples contains sample implementations that use Microsoft COM technology. The intention is to provide minimal working samples that explains how to implement and use COM objects.

Content

  • Interfaces: COM interfaces written in interface definition language (IDL)
  • AtlServer: An ATL implementation of a COM server that provides hens
  • AtlFreeServer: An COM server implemented without ATL. It provides dogs
  • ManagedServer: An COM server implemented in .NET. Here you can buy dogs.
  • PyComServer: An Com server implemented in python. It provides snakes.
  • WinrtServer: An COM server implemented in winrt as an Universal Windows component. It provides programmers.
  • ComUtility: COM related utilities used across the projects
  • TutorialsAndTests: Tutorials and tests used to demonstrate how COM objects are used from C++
  • InteropTests: Unit tests used to demonstrate how COM objects are used from .NET
  • PyComTests: Unit tests used to demonstrate how COM objects are used from python

Building

Dependencies:

com_samples's People

Contributors

supersega avatar jogerh avatar

Stargazers

Fredrik Orderud avatar  avatar  avatar  avatar  avatar  avatar

Watchers

Fredrik Orderud avatar  avatar

com_samples's Issues

WinrtServer's generated winrt folder replaces winrt folder from Windows SDK

Usually, including something from winrt like below includes winrt from the Windows SDK folder.

#include <winrt/base.h>

But, since we introduce our own winrt folder in the include path, I assume this WinrtServer winrt folder replaces the SDK winrt folder. This means that if we have client code that want to consume two different winrt-based libraries/servers, we also require that the two servers use the same version of the winrt nuget package. It also excludes use of the winrt version that is bundled with the Windows SDK.

WinrtServer winrt C++ projections are not available in client projects

The TutorialsAndTests project only seem to access WinrtServer through the low-level ABI interface, instead of the "modern" winrt C++ projection that automatically converts HRESULTs to exceptions and output arguments to return-values. This makes the client code more complex than neccesary.

Root-cause seem to be the winmdidl call in CreateCppInterop.bat. I think replacing it with a cppwinrt.exe call (found in Microsoft.Windows.CppWinRT NuGet) would make the generated headers include winrt C++ projections. Alternatively, just copy the already generated headers from the WinrtServer\Generated Files\winrt folder.

Bundle PyComServer in wheel package?

See PR #19 which introduce a COM server written in Python. Not sure if this helps anyone, but I am thinking that it could be nice to bundle the PyComServer python code and .tlb file in a wheel package that is installed into a python virtual environment. This way, the Python COM server becomes a self-contained package with less parts to manage and think about once installed.

AtlServer build error

I'm experiencing the following problem when attempting to build AtlServer with VS2019:

1>------ Build started: Project: AtlServer, Configuration: Debug x64 ------
1>AtlServer.rc(13): fatal error RC1015: cannot open include file 'afxres.h'.
1>
1>Done building project "AtlServer.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Rename project to ComSamples to match solution name?

I see that the project/repo is currently named "com_samples" whereas the solution is named "ComCamples". Could it be an idea to rename the project to "ComSamples" so that it matches the solution name?

GitHub will automatically forward the old URL to the new name, so existing clones will not be broken by a rename.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.