🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1928

Re: Loadlibrary failure for DLL with large mem req.

#1928
From: Bob Gonder
Date: Thu, 07 Jun 2007 16:12
19 lines
1616 bytes
nagoyadam wrote:

>I have a DLL written in Fortran and I know that very large matrices is
>used in it.
>My problem is that I can not load this DLL using LoadLibrary,

Did you check the error code?

>if I linked the DLL's lib file with my program I have no problems.
>Since it uses very huge memory I would like to load it on demand.

My guess is that  there isn't enough contiguous memory for the dll.
But if the linker knows about it, memory is set aside and other dlls
are shifted around to make room.

>Any idea of how to do it?

You might try setting the dll as "Delay Load"
In your code, you treat it as a normal preloaded dll.
Technical Details
Message-ID: <p8bg63p3mipc4u8sdfu91bclt70dsaakv4@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <1181196641.804110.173150@r19g2000prf.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9dbe7f239dea0988
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Loadlibrary failure for DLL with large mem req.
Date: Thu, 07 Jun 2007 09:12:59 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <p8bg63p3mipc4u8sdfu91bclt70dsaakv4@4ax.com>
References: <1181196641.804110.173150@r19g2000prf.googlegroups.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.84.157
X-Trace: newsgroups.borland.com 1181232778 69.69.84.157 (7 Jun 2007 09:12:58 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail