Discussions related to Visual Prolog
Tonton Luc
VIP Member
Posts: 204 Joined: 16 Oct 2001 23:01
Unread post
by Tonton Luc » 20 Apr 2016 20:55
Hi,
Which is the good declaration in a VP 7.3 dLL please ?
Code: Select all
predicates
test1 : ( string8, string8*, real) -> string8 Reponse procedure ( i, i, i) language stdcall as "_test1@12" .
test1 : ( string8, string8*, real) -> string8 Reponse procedure ( i, i, i) language stdcall as "_test1@16" .
test1 : ( string8, string8*, real) -> string8 Reponse procedure ( i, i, i) language stdcall as "_test1@24" .
test1 : ( string8, string8*, real) -> string8 Reponse procedure ( i, i, i) language stdcall as "_test1@32" .
I don't remember how to calculate the value after @ : 12, 16, 24 or 32.
Thomas Linder Puls
VIP Member
Posts: 1424 Joined: 28 Feb 2000 0:01
Unread post
by Thomas Linder Puls » 21 Apr 2016 8:14
You may have a look at
Domains#Calling_Convention pay attention to what is written about
apicall
The value after @ is the size that the arguments occupy on the call stack.
In this case right number is 16 because a string8 and lists are 4 bytes (a pointer) and the real 64 bit.
However, if only you intend to call this from Visual Prolog you don't need to follow the @ standard (or to use stdcall for that matter, and you can even call nondeterministic predicates).
Regards Thomas Linder Puls
PDC
Tonton Luc
VIP Member
Posts: 204 Joined: 16 Oct 2001 23:01
Unread post
by Tonton Luc » 21 Apr 2016 9:32
Hi,
Exactly what I need.
Many thanks for your help.
This VP 7.3 dLL is calling from a VP 5.2 application => so I need to indicate this value.
Tonton Luc
VIP Member
Posts: 204 Joined: 16 Oct 2001 23:01
Unread post
by Tonton Luc » 21 Apr 2016 14:34
Hi,
And what about integer ?
Only string and string8 needs value after @ ?
Does this following predicates is ok ?
Code: Select all
calculer_vr_multiple : ( integer, integer, integer, integer, integer, integer_list) procedure ( i, i, i, i, i, o) language stdcall as "_calculer_vr_multiple@" .
Tonton Luc
VIP Member
Posts: 204 Joined: 16 Oct 2001 23:01
Unread post
by Tonton Luc » 24 Aug 2016 6:29
Hi,
Sorry but I don't really understand your question. Do you mean how to link VP application with a VB dLL maybee ?
I never make VB08.