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

  • Home
  • SEARCH
  • 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 7829323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:43:32+00:00 2026-06-02T10:43:32+00:00

I have a function in C++ that needs to call a C# dll. The

  • 0

I have a function in C++ that needs to call a C# dll.
The C++ function simply sends values to the C# dll functions.
The C# dll uses these values to produce some files and then finishes.

My problem is that when using COM I need to register the DLL everytime when using a different computer.
So, is there any way to register the dll file and produce a .tlb file on build?

copy $(TargetPath) $(TargetDir) C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe $(TargetPath) /codebase CReportGenerationDLL.dll /tlb:CReportGenerationDLL.tlb

This is what i have tried, but it wont work.. I get exited with code 9009

//Pewdut

  • 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-02T10:43:34+00:00Added an answer on June 2, 2026 at 10:43 am

    If your meaning is to register your COM object automatically each time when building your application on another compputer, then the answer is (assuming you are using VS2010 for building) :
    Go to Project/Properties/Build events and add to the “Post-build event command line”
    the following line:

    regasm <path to your COM .dll>
    

    If your meaning is to register your COM object automatically each time when running your application on another compputer, then you can create a batch file which contains:

    regasm <path to your COM .dll>
    <path to your application>app.exe"
    

    Or just call regasm.exe from your application using ShellExecute function.

    You may want to add /s switch to make the registration silent.

    Error 9009 says that your path to regasm is wrong, see here

    copy $(TargetPath) $(TargetDir) is out of place, why do you need this, what are you trying to achieve?

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

Sidebar

Related Questions

I have a C++ DLL that needs to call a function (pass a value,
I have an Adobe Flex application that needs to call C++ functions from a
I have a function in a managed C++ DLL that needs to pass 128
We have a VB.NET program that needs to periodically call a function in an
I have a function that i need to call on iframe mousemove(). But i
I have a function that needs to append a sequence of numbers (starting with
I have a c# function that needs to write to a SQL image column.
I have a function that might fail, so the value it returns needs to
We have a moderate size (40-odd function) C API that needs to be called
I have an if statement that needs to look like this: UPDATE $(input#textbox).keypress(function(e){ key==e.which;

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.