C# Script Bridging for Customizing Legacy C Applications

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Legacy applications written in C are difficult to customize and not compatible with cloud-based environments, while modern languages like C# offer better customizability but lack direct compatibility with C source codes.

Innovation Solution

A computer-implemented method translates C# methods into C, utilizing Pinvoke and converting C++ types to C types, enabling customization of C applications through a.NET environment and NuGet server integration.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If C# is used for application development, then customizability and cloud compatibility are improved, but compatibility with existing C source codes deteriorates

Engineering Contradiction:
ImprovecustomizabilityVSAvoidcompatibility complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent introduces C# as an intermediary language that can call C functions through P/Invoke mechanisms. This allows existing C code to be reused while enabling customization through C# scripts, resolving the contradiction between maintaining C code compatibility and achieving C#-level customizability.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system segments the application into two parts: core functionality implemented in C that remains unchanged, and customizable sections implemented in C# that can be modified by end users. This segmentation allows each language to be used where it provides the most benefit.

Inventive Principle:
Principle #1Segmentation

2Stability of the object's composition

If C is used for legacy applications, then compatibility with existing code is maintained, but ease of customization deteriorates

Engineering Contradiction:
Improvecode compatibilityVSAvoidcustomization ease
Core Design Contradiction:
Stability of the object's compositionVSEase of operation

Solution Approach 1:

C# serves as a mediator that provides an easier-to-use interface for customizing C applications. End users can write C# scripts to customize applications without directly modifying C source code, maintaining stability while improving ease of operation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system allows C# to copy and call C functions through P/Invoke, enabling customization without duplicating or modifying the original C code. This preserves the original code's stability while enabling easy customization through C# wrappers.

Inventive Principle:
Principle #26Copying

3Adaptability or versatility

If C# methods are integrated into C applications, then customizability is improved, but system complexity increases

Engineering Contradiction:
Improveapplication customizabilityVSAvoidsystem integration complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The P/Invoke mechanism acts as an intermediary layer that handles the complexity of integrating C# methods into C applications. This abstraction layer manages type conversions and calling conventions, hiding the integration complexity from end users while enabling powerful customization capabilities.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20260003591A1Computer-implemented method of executing a method code, written in c#, from another c language
Publication Date: 2026.01.01 SIEMENS INDUSTRY SOFTWARE INC
  • US20260003591A1 patent drawing
  • US20260003591A1 patent drawing

AI summary

A computer-implemented method of executing a method code, written in C #, from another C language is provided. The computer-implemented method includes identifying an attribution written in C #script, and identifying a method corresponding to the attribute. The method is written in the C #script. The computer-implemented method includes calling the C #method from C. In this way, legacy source code written in another language such as C or C++ may be modified by a user in C #.