RE: dynamic loading of dll's, ccall

From: Campbell, Robert D (UK) <"Campbell,>
Date: Thu, 12 Feb 2004 09:34:07 +0000

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


Fyodor wrote:

>> Yes, you are right, the ccall was for experiment.
>>
>> > (1.) ... On Windows the standard calling convention is the
>> Pascal convention ...

>> > The entire WinApi e.g. is specified in Pascal calling convention.
>>
>> I did not know that -- but that's implied by the BB
>> interface modules of course.
>>
>> Does not C/C++ (gcc etc.) produce ccall by default?
>>
>> > Here I have to say that there is no possibility to specify the
>> > calling convention for a procedure type. You can see this
>> in the extended

>> > syntax for interface modules in the platfrom specific issues.
>>
>> So if one runs across a source-less dll compiled with ccall,
>> one is stuck (I have not run into one yet).
>> Knowledge is power :)


A long time ago I wrote a FORTRAN (Visual, I think) dll.
The default calling convention was neither StdCall or ccall,
so the dll could not be read by BlackBox at all.

Deep within the FORTRAN documentation I found that it could
be altered (I forget to which, probably either). In the end
I got it all working, but at the cost of much time consuming
trial and error.

I generally prefer to translate stuff than work cross-language.
I certainly find it less frustrating.

Robert

********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
--------------------------------------------

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-2004165002_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lc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