Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
G

Gaston Verelst

@Gaston Verelst
About
Posts
71
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Has MS done it again
    G Gaston Verelst

    I just learned something new here, thank you ! :-)

    Check out my blog at http://msdev.pro/

    The Lounge javascript performance question

  • C# autocomplete
    G Gaston Verelst

    "Telepatic Typing" :)

    Check out my blog at http://msdev.pro/

    The Lounge csharp database visual-studio testing tools

  • any old games to suggest?
    G Gaston Verelst

    I had hours of fun with [Leisure Suit Larry - Wikipedia](https://en.wikipedia.org/wiki/Leisure\_Suit\_Larry)

    Check out my blog at http://msdev.pro/

    The Lounge question

  • Keeping track. Something I do with professional projects
    G Gaston Verelst

    That's how I work as well. Usually working in a team, I first describe in the wiki what I'm going to implement and how. This then serves as a "discussion board" and as later documentation.

    Check out my blog at http://msdev.pro/

    The Lounge hardware tutorial

  • What programming language are you?
    G Gaston Verelst

    I'm C++ too :-)

    Check out my blog at http://msdev.pro/

    The Lounge csharp asp-net dotnet com

  • New Member Here
    G Gaston Verelst

    Welcome !! :)

    Check out my blog at http://msdev.pro/

    The Lounge

  • Get Up And Walk Around moments
    G Gaston Verelst

    I think it doesn't count as a full cup anymore, so you can have one more :java: Enjoy :cool:

    Check out my blog at http://msdev.pro/

    The Lounge help c++ hardware algorithms question

  • Get Up And Walk Around moments
    G Gaston Verelst

    I usually make it a walk to the coffee machine :java:

    Check out my blog at http://msdev.pro/

    The Lounge help c++ hardware algorithms question

  • Creating a COM component in .NET 5
    G Gaston Verelst

    This is for a conversion, so the Delphi side will serialize the objects in a folder, and the .NET part will deserialize it and handle it further. It is a One Shot operation, so no need for fancy stuff there.

    Check out my blog at http://msdev.pro/

    .NET (Core and Framework) com help csharp dotnet debugging

  • Creating a COM component in .NET 5
    G Gaston Verelst

    According to the replies on SO this is a dead end indeed. We now are going to create classes in C# and in Delphi with all the same properties. We'll then serialize the Delphi classes to JSON, and deserialize them in C#. For this I'm writing a code generator that will use a DSL to describe the classes. It's a work-around, but at least we'll get the work done.

    Check out my blog at http://msdev.pro/

    .NET (Core and Framework) com help csharp dotnet debugging

  • Creating a COM component in .NET 5
    G Gaston Verelst

    Indeed, we have thought of alternatives before going to the "COM road". But COM seemed the easiest in our case for a couple of reasons, hence the initial question here.

    Check out my blog at http://msdev.pro/

    .NET (Core and Framework) com help csharp dotnet debugging

  • Creating a COM component in .NET 5
    G Gaston Verelst

    Hi Gerry, I was under the assumption that creating a COM component would still be as easy under .NET 5 as under the previous versions. We don't need real time at all. This would be part of a conversion program, that will run on the client PCs (> 3000 clients, with all sorts of PCs and OS's). I wanted to avoid having to serialize objects on the Delphi side, and to deserialize them on the .NET side. I think that we will resort to creating a file (or a couple of files) in a folder, and when that is done running the conversion program on the client PC. That way we only have to install .NET 5 and the conversion program, which is even easier than using a queue. Thank you for thinking with me for solutions! I am going to do 1 more try, posting the same question on SO. Please don't be insulted ;-) If I find a solution I will post it here.

    Check out my blog at http://msdev.pro/

    .NET (Core and Framework) com help csharp dotnet debugging

  • Creating a COM component in .NET 5
    G Gaston Verelst

    Thanks for the link! Unfortunately it doesn't help. It seems that regasm doesn't recognize .NET 5 assemblies. Regsvr32 does, and it registers the component / interface / library, but no TLB is generated. That makes it virtually useless. From [Exposing .NET Core components to COM | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/core/native-interop/expose-components-to-com) :

    Quote:

    Unlike in .NET Framework, there is no support in .NET Core or .NET 5+ for generating a COM Type Library (TLB) from a .NET assembly. The guidance is to either manually write an IDL file or a C/C++ header for the native declarations of the COM interfaces.

    So now I'm investigating how to create / compile / use the correct IDL file. Should anyone have some good pointers for that, let me know :-) Thanks, Gaston

    Check out my blog at http://msdev.pro/

    .NET (Core and Framework) com help csharp dotnet debugging

  • Creating a COM component in .NET 5
    G Gaston Verelst

    Hi Gerry, Thanks for the tips. But I'm afraid that changing the names will not help in registering the COM component. If you have tips for that I'll be glad to hear them. Thanks, Gaston

    Check out my blog at http://msdev.pro/

    .NET (Core and Framework) com help csharp dotnet debugging

  • Creating a COM component in .NET 5
    G Gaston Verelst

    Hi, I'm trying to create a simple COM component in .NET 5. I have gotten this far: * I have created an interface with the right attributes:

    \[ComVisible(true)\]
    \[Guid("12345678-3e60-4c56-abcd-13d4098434f7")\]
    \[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)\]
    public interface IConvertor
    {
        string ConvertPatient(string s);
    }
    

    * I have created a class that implements this interface:

    \[ComVisible(true)\]
    //\[ClassInterface(ClassInterfaceType.None)\]
    public class Convertor : IConvertor
    {
        public Convertor()
        { }
    
        public string ConvertPatient(string s)
        {
            return "Hello, " + s;
        }
    }
    

    I tried with and without the ClassInterface and Guid attributes. * In the .csproj file I added these:

    net5.0

    	true
    	true
    
    
      x86
    

    I compiled for x86 and I got these files (and some more): xxx.comhost.dll xxx.dll The problem is that I don't manage to register this component. tlbexp xxx.InterOp.dll gives me this error:

    Quote:

    TlbExp : error TX0000 : Type library exporter encountered an error while processing 'hdmpcloud.ehealth.FhirTools.InterOp.Convertor, hdmpcloud.ehealth.FhirTools.InterOp'. Error: Type library exporter cannot load type 'hdmpcloud.ehealth.FhirTools.InterOp.Convertor' (error: Could not load file or assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (Exception from HRESULT: 0x80070002)).

    regasm /tlb xxx.InterOp.comhost.dll gives me

    Quote:

    RegAsm : error RA0000 : Failed to load 'C:\_projects\HDMP\hdmpcloud.ehealth.FhirTools\InterOp\hdmpcloud.ehealth.FhirTools.InterOp\bin\Debug\net5.0\hdmpcloud.ehealth.FhirTools.InterOp.comhost.dll' because it is not a valid .NET assembly

    I want to call this compo

    .NET (Core and Framework) com help csharp dotnet debugging

  • Normalization
    G Gaston Verelst

    I normalize until 3rd NF. Maybe I'll have some denormalized tables for quick access. But I only do that when performance is not good, and I can't find another problem. That is, no premature optimizations.

    Check out my blog at http://msdev.pro/

    The Lounge question

  • Well, here goes ... my Surface is updating to Win 11.
    G Gaston Verelst

    It worked good on my Surface, you may be lucky as well :-)

    Check out my blog at http://msdev.pro/

    The Lounge com lounge

  • That's one way to do it
    G Gaston Verelst

    They could even have used a switch statement. Odd that they didn't think of that :)

    Check out my blog at http://msdev.pro/

    The Weird and The Wonderful com help

  • F# Book Suggestions?
    G Gaston Verelst

    I did, it gave me a bitter-sweet taste ;-)

    Check out my blog at http://msdev.pro/

    The Lounge tutorial learning csharp com regex

  • F# Book Suggestions?
    G Gaston Verelst

    I suppose you already found this excellent site: [https://fsharpforfunandprofit.com/\](https://fsharpforfunandprofit.com/) It not only covers the language, but also many concepts. I read big parts of it when I was commuting by train (in Belgium that gives you sometimes more time than you planned ;-))

    Check out my blog at http://msdev.pro/

    The Lounge tutorial learning csharp com regex
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups