Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8458421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:04:35+00:00 2026-06-10T13:04:35+00:00

I have a simple c++ Application. This Application is just printing text out. I

  • 0

I have a simple c++ Application. This Application is just printing text out.
I have also a c# .dll NET 3.5 which parses complex xml files, extracts values and saves them into a List. Its like 2 Classes with 4 methods. They open a file, parse the xml and store it into a List. When the c# .dll is done, it has a List with 10000 values;

Since i do not want to write the complex parsing XML in c++, i would like to use my c# xml parsing .dll.

Is it possible for me, to call my c# .dll from inside my c++ application, let the c# .dll parse a specified xml file, and return that created List, with the parsed xml values, to my c++ application?

In my c++ application i would proceed to modify the data within the returned list.

edit: i would be using vc++ (Microsoft Visual Studio 2010)

edit2: the vc++ app would be an expension/plug-in to another bigger Application. I would register the plug-in to that bigger application, and every time i press the icon in the menu, my vc++ application would be started

edit3: Has anyone experience with such a task? I kinda need a clear yes or no if it is possible.

edit4: i do want to avoid reading files that have been written by my .net .dll. I want my c++ app to send a string to my .net .dll and receive back a list/array object. Or is this a bad idea and i should do the xml parsing in c++ itself?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:04:37+00:00Added an answer on June 10, 2026 at 1:04 pm

    Yes, you can do it, but its kinda hard. One way to do it is to use C++ to load up CLR and execute your function, something like this:

    code inspired by Blizzhackers.cc

    void StartNET()
    {
       DWORD result;
       ICLRRuntimeHost* pCLR = NULL;
    
       CorBindToRuntimeEx(NULL, L"wks", NULL, CLSID_CLRRuntimeHost, IID_ICLRRuntimeHost, (LPVOID*)&pCLR);
       pCLR->Start();
    
       pCLR->ExecuteInDefaultAppDomain(L"C:\\myNET.dll", L"myNet.Program", L"Main", L"arg", &result);
    
       pCLR->Stop();
    }
    

    This C++ code will execute the int Main(string arg) function from namespace myNet and class Program, by that I mean:

    myNET.dll:

    namespace myNet
    {
         class Program
         {
                int Main(string arg)
                {
                        //and here you can run your XML parser:
    
                        List<string> myList = XMLParse();
    
                        FileStream fs = new Filestream("xmllist.txt");
                        StreamWriter sw = new StreamWriter(fs);
    
                        foreach(string s in myList)
                             sw.WriteLine(s);
    
                        sw.Close();
                        fs.Close();
    
                        return 1;
                }
    
                List<string> XMLParse()
                {
                        //Your code here
                        return aList;
                }
         }
    
    }
    

    And after this you could use c++ to get the files from xmllist.txt, something like:

    vector<char[]> getList()
    {
          vector<char[]> *myVector = new vector<char>;
          ifstream cin("xmllist.txt");
          while(!cin.eof())
          {
              char line[100];
              cin >> line;
              myVector.push(line);
          }
          cin.close();
          return myVector;
    }
    

    I don’t know if this last function works, but you get the general idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this scala application which is very simple . All that it does
I have a simple application which takes a text and password, generates a text
I just have a simple question regarding dbms_stats.gather_table_stats. In our application this statement occurs
I have a simple WPF application that uses ClickOnce to handle installing. Within this
I have this simple code in a WPF application: ThreadStart start = delegate() {
I have a simple application that loads an unmanaged dll and passes a few
I have a simple application in which I need to let the user select
I have a simple application written in C# and .Net 2.0 that displays several
I have a simple application which basically consists of a line of buttons and
I have a simple C# 2008 application which displays a png-picture and handles some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.