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 8549767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:47:41+00:00 2026-06-11T13:47:41+00:00

I have a c# ui that makes calls to a C dll . The

  • 0

I have a c# ui that makes calls to a C dll. The UI opens a workspace, and I’d like the DLL to load a large file in the background while the user is doing other work in the workspace. Right now, the UI communicates with the DLL with the help of pinvoke. (The loadFile is one of the C dll functions.)

At some point the user will do something in the workspace that requires that the file be fully loaded, so there would be a need to somehow query the DLL whether it has finished loading the file. I have the source for the c# and C code, so I could change things on either side.

Being new to c#, and never more than an amateur C coder, can I achieve what I want using a c# backgroundWorker?

Or using some form of threading?

Or will the C dll just block everything until it is done loading?

  • 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-11T13:47:42+00:00Added an answer on June 11, 2026 at 1:47 pm

    You can invoke the C function from background worker component. Further you need to make sure that completion event of background worker is fired. This can be set using properties of background worker.

    This way, when the background worker finishes its job, it will notify the user interface that the work is done and the user interface can appropriately treat the image.

    Here, you have to make sure that your C code is Blocking, i.e. NOT multithreaded to ensure that the background worker event is fired only after the function has done its work.

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

Sidebar

Related Questions

I have an Excel file that calls a .net DLL (called MyDLL) in the
I have a .NET application that makes calls to a native Win32 DLL using
I have a query that makes several calls within a SELECT statement to a
So we have an application that makes udp calls and sends packets. However, since
I have a COM component written in C# that makes calls to ConfigurationManager.AppSettings.Get(...). This
I have a function that makes a series of calls to sscanf() and then,
Under JBoss 4.0.1SP1, I have a servlet that makes multiple, concurrent calls to web
I have a WPF windows application that makes a call to a DLL for
I have a service that makes a call to an unmanaged dll. On a
I have an ASP.NET web application that calls a .NET DLL, that in turn

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.