Re: [BLACKBOX] Loading self made dlls

From: [at]} <Blackbox>
Date: Thu, 7 Jul 2011 05:14:28 +0200


Hi Doug,
 
please try and include the module HostFiles into your DevLinker command.
 
With best regards,
 
Marc
 


  _____

From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
Sent: Donnerstag, 7. Juli 2011 02:35
To: BLACKBOX{([at]})nowhere.xy
Subject: [BLACKBOX] Loading self made dlls


Folks,

I have hit a serious problem.
I created a dll but can not load it.
I have done a binary search with commenting out huge chucks of code
and isolating the problem to one BB system call.

        .loc := Files.dir.This(path$);

If that line is not included then the dll loads. If it is included then
the dll fails with error code 998.

Running all of the code but not as a linked dll works just fine.
The linkage is

 DevLinker.LinkDll FaceSmooth.dll :=
Kernel+
ObxRandom
Math
Strings
Files
Vectors
Matrices
AbstractRings
Polynomials
Inis
TrackingFaceSmoothDll# ~

This is short and sweet since I have eliminated all output
such as Out, or Dialog. It links just fine.

So why would making a call to Files cause the dll to fail to load?
In the body of the dll the BEGIN contains a call to my initialization
code which includes opening and closing a file and hence the
call to Files.dir.This. Again this works when not a dll but fails when is a dll.

I am looking for suggestions here.

Here is what MicroSquish says about 998 error

"The LoadLibrary() API may sometimes encounter an access violation while attempting to map a specified module into the address space of the calling process. In this event, LoadLibrary() returns a value of NULL and GetLastError() returns an error code of 998 (ERROR_NOACCESS)."

-Doug Danforth



---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy

---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Thu Jul 07 2011 - 05:14:28 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:12 UTC