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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:34:25+00:00 2026-05-14T20:34:25+00:00

Language : C++ Platform : Windows Server 2003 I have an exe calling a

  • 0

Language : C++

Platform : Windows Server 2003

I have an exe calling a DLL.

EDIT :
(exe is not doing anything, it calls few global function which does everything related to DLL within DLL. It does not explicitly new any of DLL classes)

I allocate (new) the memory for class A within the DLL, it returns me a non-local heap pointer.

I tried to new other classes within the DLL (which are in DLL), “new” returns a valid heap pointer for them, its only Class A which is not being allocated properly.

I am on windows and validating the heap by this function call :

EDIT:

 ClassA* pA = new ClassA(); 

 _CrtIsValidHeapPointer ( (const void *) pA )

I am seriously confused why this only happens with new-ing Class A and no other class ?

(All Native Code)

FINAL EDIT :
it turned out to be a bad build. can’t get it to reproduce in the new one… wasted 5 days on this :'(

  • 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-14T20:34:26+00:00Added an answer on May 14, 2026 at 8:34 pm

    Export only global functions from DLLs and call only exported functions and through v-tables. Your problem is only one of many caused by trying to export entire classes. DLLs aren’t the same as .so libraries.

    EDIT: Since the question now reveals that the class isn’t exported, but all of this is observed inside the single DLL, going to suggest other possible causes.

    Is the same pointer returned from new being tested, or could it be a pointer to a base sub-object? Did the allocation use new or new []? Either of these could cause the pointer to point into the middle of a heap block instead of the start.

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

Sidebar

Related Questions

I have an issue on our Windows 2003 x64 Build Server when invoking shell
Context Language: C# Platform Version: Microsoft .Net Framework 4.0 Operating System: Windows 7 Professional
I'm looking for cross-platform scripting (language) for windows, Linux, MacOS X. I'm tired of
I have been trying to learn a cross platform language with a fast learning
Platform - iOS. Language - Object c, OpenGL. I have to put 2 UIViews
I recently upgraded my web server to Windows 2003 R2 Enterprise 64 Bit. Now
I have a Java server process that I normally run in either Windows batch
Here's the scenario: Platform: Windows IDE: Microsoft Visual Studio 2008 Language: C# .NET framework:
I'm currently working on a strategy for managing multiple Windows Server 2003 to 2008
Looking for a simple script that would run on windows 2003 server that would

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.