Re: [BLACKBOX] Loading self made dlls

From: [at]} <Wojtek>
Date: Wed, 6 Jul 2011 23:43:50 -0400

----boundary-LibPST-iamunique-808450025_-_-
Content-type: text/plain

> I don't think I would ever have found that but in retrospect it is
> obvious.

Obvious? Why obvious?


> Thank you very much!
> -Doug Danforth
>
>
>
> On 7/6/2011 8:14 PM, Blackbox Support Oberon microsystems AG wrote:
> Hi Doug, please try and include
> the module HostFiles into your DevLinker command.
> With best regards, Marc
> From: BlackBox
> [mailto:BLACKBOX{([at]})nowhere.xy
> Douglas G. Danforth
> 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
> ---- 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----boundary-LibPST-iamunique-808450025_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4gIEkgZG9uJ3QgdGhpbmsgSSB3b3VsZCBldmVy
IGhhdmUgZm91bmQgdGhhdCBidXQgaW4gcmV0cm9zcGVjdCBpdCBpc1xwYXINCj4gIG9idmlvdXMu
XHBhcg0KXHBhcg0KT2J2aW91cz8gV2h5IG9idmlvdXM/XHBhcg0KXHBhcg0KXHBhcg0KPiAgICAg
IFRoYW5rIHlvdSB2ZXJ5IG11Y2ghXHBhcg0KPiAgICAgIC1Eb3VnIERhbmZvcnRoXHBhcg0KPlxw
YXINCj5ccGFyDQo+XHBhcg0KPiAgICAgIE9uIDcvNi8yMDExIDg6MTQgUE0sIEJsYWNrYm94IFN1
cHBvcnQgT2Jlcm9uIG1pY3Jvc3lzdGVtcyBBRyB3cm90ZTpccGFyDQo+ICAgICAgICAgICAgICAg
ICAgICAgICAgSGkgRG91ZywgICAgICAgICAgICAgICBwbGVhc2UgdHJ5IGFuZCBpbmNsdWRlXHBh
cg0KPiB0aGUgbW9kdWxl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w
YXINCj4gICAgICAgICAgICAtRG91ZyBEYW5mb3J0aFxwYXINCj5ccGFyDQo+XHBhcg0KPiAtLS0t
IFRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVzc2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgICAgICAg
ICAgIEJMQUNLQk9YIlxwYXINCj4gdG8gTElTVFNFUlZATElTVFMuT0JFUk9OLkNIXHBhcg0KPiAg
ICAgICAgICAtLS0tICAgICAgICAgVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGgg
Ym9keSAiU0lHTk9GRlxwYXINCj4gQkxBQ0tCT1giIHRvICAgICAgICAgTElTVFNFUlZATElTVFMu
T0JFUk9OLkNIXHBhcg0KPiAgLS0tLSBUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0
aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0b1xwYXINCj4gTElTVFNFUlZATElTVFMuT0JFUk9O
LkNIXHBhcg0KXHBhcg0KXHBhcg0KLS0tLVxwYXINClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVz
c2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RTRVJWQExJU1RTLk9CRVJP
Ti5DSFxwYXINCn0
----boundary-LibPST-iamunique-808450025_-_---
Received on Thu Jul 07 2011 - 05:43:50 UTC

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