----boundary-LibPST-iamunique-1249260476_-_-
Content-type: text/plain
Fyodor Tkachov wrote:
> Dear Experts,
>
> The encoded document contains two modules:
> 1) an example of creating a dll with a function adhering to ccall conventions.
> 2) an example of a dynamic loading of the dll.
>
> I don't see how one could indicate that the function uses the ccall convention.
> Perhaps, this is not necessary? The example seems to work.
>
> Many thanks in advance for any hint.
Fyodor,
Looking back over the work I did at X-ray Instrumentation Associates I
see that I called a non-CP generated dll. In this case the CP
'interface' file needed to specify the functions in the dll had to be
tagged with the ccall flag.
When a dll is generated by CP and used by CP then the ccall flag is not
needed (your code works from CP whether or not you specify ccall but I
speculate that the parameters are left on the stack when you do. Try a
long loop repeatly calling the procedure (without I/O) to see if you get
a stack overflow).
When the dll is generated by CP but is expected to be used by non-CP
languages that use the ccall convention then within the generating
module one must use the ccall flag.
At least that is my understanding of the situation.
-Doug
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list owner at
owner-blackbox{([at]})nowhere.xy
Current posting policy:
a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.
b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.
----boundary-LibPST-iamunique-1249260476_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1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