The contents of the C# MsPpt package report errors in registration-free COM.

RL Chen 230 Reputation points
2023-11-20T03:56:09.3566667+00:00

I learned to use registration-free COM in https://learn.microsoft.com/en-us/answers/questions/1377090/calling-c-class-libraries-via-com-in-c-requires-re, but I'm found a new problem. the contents of the C# MsPpt package reported an error in registration-free COM.

NVIDIA_Share_x9mwzC3edS

Additional test items: https://1drv.ms/u/s!AqH1CC8PuY6LpksiAmnwEzJDM9-A?e=PUhmx0.

This code originally came from @RLWA32 and was released with modifications by RL Chen.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,838 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,688 questions
{count} votes

Accepted answer
  1. RLWA32 44,951 Reputation points
    2023-11-20T10:19:56.96+00:00

    I don't use Microsoft Office so I can't help you much on the specifics.

    Microsoft Office applications run as out-of-process COM servers.

    Since registration-free COM only works with in-process servers it really isn't needed here.

    If you want to automate Microsoft Office applications from a C++ application you can use the #import directive with the Microsoft Office application's type library. Then you should be able to use the generated headers to instantiate COM objects and obtain the desired interfaces directly from C++. By the way, class not registered errors frequently result from a bitness mismatch between the COM client and COM server. So if you have installed a 64-bit version of Office then your C++ COM client should be a 64-bit application.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.