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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:59:07+00:00 2026-05-22T16:59:07+00:00

I have a project that I converted from Visual Studio 2003 .NET to Visual

  • 0

I have a project that I converted from Visual Studio 2003 .NET to Visual Studio 2010. It’s NOT a .NET project; it’s Visual C++ (unmanaged).

The DLL pulls in additional DLLs. If I link an executable with this DLL, then the executable dies during the initialization of the DLL. (I can tell, there are constructors for static objects that are being called, and I can see their operation.) I’ve removed ALL VS 2010-created DLLs from my path, except for one of them, which causes the error. Replacing that one with the VS.NET-created version allows the program to run.

Since I’m not getting any useful information, I decided to write a test application that doesn’t directly link to the DLL, but instead uses LoadLibrary to load the library. The idea was that I could use GetLastError() to help figure the issue with the library. No go; I get an error code -529697949, which isn’t a Windows error code at all! (If I change the DLL to the VS.NET-created version, the program loads the DLL properly.)

I used the Dependency Walker (www.dependencywalker.com) to check the DLL, and it tells me that “At least one delay-load dependency module was not found,” highlighting IESHIMS.DLL and WER.DLL. I am seeing no other error with that tool. Running it on the VS.NET-created DLL shows the same two warnings, so I figure this is a red herring.

static void showMessage(const wchar_t *wmsg)
{
        std::wcout << wmsg << std::endl;
        ::MessageBox(NULL, wmsg, TEXT("Message"), MB_OK);
}

static void testLoadLibrary(const wchar_t *lib)
{
        ::SetLastError(0L);
        ::SetErrorMode(0);

        std::wstringstream wss;

        wss << "LoadLibrary: " << lib;
        showMessage(wss.str().c_str());
        HINSTANCE LoadME = ::AfxLoadLibrary(lib);
        if (LoadME == NULL) {
                DWORD dw = ::GetLastError();
                wss << "Failed: Error code " << dw;
                showMessage(wss.str().c_str());
                ErrorExit(lib, dw);
        } else {
                wss << "LoadLibrary of " << lib << " succeeded.";
                showMessage(wss.str().c_str());
                ::FreeLibrary(LoadME);
        }
}

Finally, I ran Process Monitor (sysinternals.com) to monitor the test program, looking at all entries with Path containing the string “dll.” I don’t see anything particularly informative in this list–no idea why the DLL is failing to load.

If I use LoadLibraryEx with DONT_RESOLVE_DLL_REFERENCES, the library loads, so this really looks like a dependency issue, which is why I’m surprised that the dependency walker isn’t being particularly helpful.

I’ve tried this on Windows 2008 R2 and Windows 2003; same behavior.

Any suggestions?

  • 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-05-22T16:59:07+00:00Added an answer on May 22, 2026 at 4:59 pm

    There is an OS tool to help diagnose problems like this. Download the SDK or DDK and use gflags.exe to set ‘Show Loader Snaps’ (+sls) for the process. That should reveal why the DLL load fails.

    The loader snaps output will appear in the debugger output window.

    Martyn

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

Sidebar

Related Questions

I have just converted a project from Visual Studio 2003 to 2005 and although
I have in Visual Studio 2008 a .NET 3.5 C# project that uses a
I converted my visual studio solution from 2008 to 2010. A project has a
I have a development database that re-deploy frequently from a Visual Studio Database project
I have a large project where we have 2-3 dll projects that are converted
I recently converted my solution from Visual Studio 2008 to 2010, hoping I would
I have a Visual Studio project that uses a solution file to build it.
I have made an application project in Visual Studio 2008 C#, SQL Server from
Now that I have built a database. Visual Studio 2008 SP1’s ADO.NET Entity Framework
I have a project converted from .NET 1.1 to 3.5 being developed in 2008.

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.