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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:39:43+00:00 2026-06-17T16:39:43+00:00

I initialize my code normally, and get a valid device / render context, and

  • 0

I initialize my code normally, and get a valid device / render context, and then store those two in a static object of type OpenGL_Display. When I then call the image update function from outside the DLL, the call to both
wglGetCurrentContext() as well as wglGetCurrentDC() return NULL.
When I call wglMakeCurrent() with the HDC and HRC stored in my class, GetLastError() will return error 170 (The requested resource is in use.)

I don’t understand how the resource could be in use from any where. Note that the code runs fine from a .exe, so it has something to do with me calling it from a C# Application, or that it is in a DLL in the first place, but for the life of me I cannot figure out why those resources are busy.

  • 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-17T16:39:43+00:00Added an answer on June 17, 2026 at 4:39 pm

    This error is returned when the context is active in another thread.

    Most likely is that your creation/initialisation code does a wglMakeCurrent(), but does not set the context back to NULL before returning.

    If the drawing then occurs on a different thread, it will be unable to set the context and will return ERROR_BUSY.

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

Sidebar

Related Questions

I would like to initialize an object in javascript.. My code is as follows:
consider below code class Repository{ public static Item i; //Item is a type (class)
From the Sun docs Normally, you would put code to initialize an instance variable
Hi, i'm have this code for initialize my class. - (id)initWithSize:(int)size { self =
I have code: class Scene def initialize(number) @number = number end attr_reader :number end
Here is some code: class Person def initialize(age) @age = age end def age
When I try to initialize the speech recognizer with the following code: SpeechRecognizer rec
I have the following piece of code: $(document).ready(initialize); function initialize() { $('#btnPoint').css('width', $('#btnPoint').width()); }
Let's go to the code directly: #!/usr/bin/ruby require 'tk' class Epg def initialize @var
I have this code: class DocumentIdentifier attr_reader :folder, :name def initialize( folder, name )

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.