Calling DLL
Posted: Thu Aug 21, 2008 1:04 pm
hi
simple thinks first
i have a simple question about PureDispHelper which it's page in:
http://www.purebasic.fr/english/viewtopic.php?t=26744
and i am confused about the correct code.
i have an activex dll made by activestate perl development kit which it's function is to join two strings: it's main code is:
package joining;
sub joinwords
{
my $word1 = $_[0];
my $word2 = $_[1];
my $word3 = $word1.$word2;
return $word3;
}
;;;;;;;;;;;;;;;;;;
the successful visual basic 6.0 code to invoke such a dll is:
Dim objjoin
Dim result
Set objjoin = CreateObject("joining.Library")
word1$ = "first"
word2$ = "second"
result = objjoin.joinwords(word1$, word2$)
MsgBox (result)
Set objjoin = Nothing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
in purebasic:
XIncludeFile "DispHelper_Include.pb"
dhToggleExceptions(#True)
Define.l tojoin
tojoin = dhCreateObject("joining.Library")
If tojoin
dhPutValue(... i am confused here
dhCallMethod(... confused
dhGetValue(... confused
MessageRequester(result.s)
;;;;;;;;;;;;;;;;;;;;;;
can someone please give me an answer for the absolute beginner . how to supply the two words "first" and "second" from purebasic to that joining.dll and return the result as the string "firstsecond".
thanks
simple thinks first
i have a simple question about PureDispHelper which it's page in:
http://www.purebasic.fr/english/viewtopic.php?t=26744
and i am confused about the correct code.
i have an activex dll made by activestate perl development kit which it's function is to join two strings: it's main code is:
package joining;
sub joinwords
{
my $word1 = $_[0];
my $word2 = $_[1];
my $word3 = $word1.$word2;
return $word3;
}
;;;;;;;;;;;;;;;;;;
the successful visual basic 6.0 code to invoke such a dll is:
Dim objjoin
Dim result
Set objjoin = CreateObject("joining.Library")
word1$ = "first"
word2$ = "second"
result = objjoin.joinwords(word1$, word2$)
MsgBox (result)
Set objjoin = Nothing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
in purebasic:
XIncludeFile "DispHelper_Include.pb"
dhToggleExceptions(#True)
Define.l tojoin
tojoin = dhCreateObject("joining.Library")
If tojoin
dhPutValue(... i am confused here

dhCallMethod(... confused

dhGetValue(... confused

MessageRequester(result.s)
;;;;;;;;;;;;;;;;;;;;;;
can someone please give me an answer for the absolute beginner . how to supply the two words "first" and "second" from purebasic to that joining.dll and return the result as the string "firstsecond".
thanks