Page 1 of 2 12>
Topic Options
#167490 - 2006-09-12 11:05 AM use of a dll
guenni Offline
Fresh Scripter

Registered: 2006-09-12
Posts: 9
Hi,
I will write a program which use a dll file.
Here are 2 lines, which I want to write in kix..

call rxfuncadd "hllapi", "saahlapi", "hllapisrv"
rc=hllapi("Connect",A)

How can I make this in kix?
Thanks and best regards from Germany

Top
#167491 - 2006-09-12 11:12 AM Re: use of a dll
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what is rxfuncadd???
Top
#167492 - 2006-09-12 11:15 AM Re: use of a dll
guenni Offline
Fresh Scripter

Registered: 2006-09-12
Posts: 9
>>-RXFUNCADD(name,module-+------------+-)----------------------><
'-,procedure-'

Registers the function name, making it available to REXX procedures. A return value 0 signifies successful registration. A return value 1 signifies that the function is already registered.

rxfuncadd('SysCls','rexxutil', 'SysCls') -> 0 /* if not already registered */
-> 1 /* if already registered */


I know that I can use a dll with CreateObject.
But I don't know how I can use the functions etc...

Top
#167493 - 2006-09-12 11:46 AM Re: use of a dll
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
all the functions and stuff from dll are accessed via createobject.
but if the dll doesn't support automation, it won't play with kixtart.

Top
#167494 - 2006-09-12 11:49 AM Re: use of a dll
guenni Offline
Fresh Scripter

Registered: 2006-09-12
Posts: 9
Is there no other way to get a dll work ?

Thanks Dirk

Top
#167495 - 2006-09-13 05:15 AM Re: use of a dll
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
No, the DLL has to support the CreateObject() functionality, which would imply COM automation.
_________________________
There are two types of vessels, submarines and targets.

Top
#167496 - 2006-09-13 06:06 AM Re: use of a dll
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You might be able to do something rith RunDLL32.
Top
#167497 - 2006-09-13 08:38 PM Re: use of a dll
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Read this thread: http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB14&Number=143564

Let me know if it helps.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#167498 - 2006-09-15 08:36 AM Re: use of a dll
guenni Offline
Fresh Scripter

Registered: 2006-09-12
Posts: 9
Thx for the Link!
I have the Problem, that why u know you must call HBullock.AdminObjects ?
I use PE_Explorer to watch the dll and there is no such information.

I watched also my dlls and there is no Funktion for Register or Unregister the dll. So when I want register the dll with RegSvr32 there is a fault. Is this a sign that the dll didn't support COM Automation?

Thanks for help

Top
#167499 - 2006-09-16 01:50 AM Re: use of a dll
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Please post your test code.

did you register the DLL? REGSVR32 HABobjects.DLL


I wrote the DLL. The following code works on my computer.
Code:
break on
$iRC=SETOPTION('WrapAtEOL','on')
$HABObject = createobject("HBullock.AdminObjects")
if vartypename($HABObject) <> "Object"
? "Not an object ("HBullock.AdminObjects"): " + @serror
endif

;Docs:
;
;You need to pass 4 parameters:
; 1. The name of the library from which you want to import the function.
; 2. The name of the function (as exported by the library).
; 3. The number and types of the arguments the function expects as input.
; 4. The type of the value returned by the function.
;
;Parameters 3 and 4 follow:
; I: value is an integer (int)
; N: value is a number (long)
; F: value is a floating point number (float)
; D: value is a double precision number (double)
; C: value is a char (char)
; P: value is a pointer (to a string, structure, etc)
;
;Parameter 4 could also be V for void
;
;$GetProcessID = $HABObject.Win32API ("kernel32", "GetCurrentProcessId", "", "I" )
; kernel32 is name of library
; GetCurrentProcessId is name of function
; There are no input paramters
; The function returns an integer



;This works great.
;------------------

$GetProcessID = $HABObject.Win32API ("kernel32", "GetCurrentProcessId", "", "I" )
? "Win32API call: " + @serror
? vartypename($GetProcessID)
$pid = $GetProcessID.Call
? "pid = " + $pid
?



Edited by Howard Bullock (2006-09-16 01:53 AM)
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#167500 - 2006-09-18 07:59 AM Re: use of a dll
guenni Offline
Fresh Scripter

Registered: 2006-09-12
Posts: 9
Your DLL really works fine.
My Problem is, that you call "HBullock.AdminObjects"
But from where I know that I must call exactly this? There is no Funktion which is named HBullock.AdminObjects. And I dind't know what i must call in my dll.
But my DLL haven't the functions for Registration.

Regards and thanks
Dirk

Top
#167501 - 2006-09-18 08:26 PM Re: use of a dll
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
This is simply a COM library.

I do not call"HBullock.AdminObjects". It is a name not a method. I use the name to access the COM object by name.

Beyond that explanation you will have to be more specific as I do not understand what you are attempting to do or how you are are coding the test.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#167502 - 2006-09-18 08:54 PM Re: use of a dll
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
think he is saying that even though your dll registered fine, he still can't use his dll.
Top
#167503 - 2006-09-19 12:42 AM Re: use of a dll
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
I think this stuff is WAY OFF TOPIC and should be moved to General or closed.

From what I gather he either obtained or built a DLL in some Language and does not know enough about COM object in the first place to setup the connection between his DLL and other DLLs that have a server to accept connections.

Top
#167504 - 2006-09-19 01:27 AM Re: use of a dll
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Yes, move this thread.
Top
#167505 - 2006-09-19 08:23 AM Re: use of a dll
guenni Offline
Fresh Scripter

Registered: 2006-09-12
Posts: 9
Ok you make with CreateObject a Reference to the Object called "HBullock.AdminObjects". My Problem is, that I dind't know, why you call exactly this HBullock must be the serverclassname and AdminObjects the Typclass? But from where you know that u must exactly call this? The name is different, also when I watch the dll with PE Explorer there is nothing to see with HBullock.

The Problem is, that I must know, if it is possible to let my dll run with kix...

Top
#167506 - 2006-09-20 06:03 AM Re: use of a dll
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Howard uses his DLL as a mean to expose KiXtart to the DLL that you provided as KiXtart cannot directly interact with your DLL. Still, the question remains, what exactly do you try to accomlish with your DLL and KiXtart?
_________________________
There are two types of vessels, submarines and targets.

Top
#167507 - 2006-09-20 02:29 PM Re: use of a dll
guenni Offline
Fresh Scripter

Registered: 2006-09-12
Posts: 9
I will use a ehllapi.dll to make a 3270 session. In RExx it is no Problem to use the dll. But I don't know if it is possible to use this also with kix.
Top
#167508 - 2006-09-20 02:55 PM Re: use of a dll
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Well with just a little bit of digging I found this site, which might help shed some light on what is going on. Not being a programmer, I really don't know what I am looking at, but someone else here might be able to do more with it.

http://www.codeproject.com/csharp/ALL_EHLLAPI.asp
http://groups.google.com/group/microsoft...ic&rnum=6&hl=en
http://www.hummingbird.com/support/nc/he/hllapi_dlls.html?cks=y

Top
#167509 - 2006-09-20 03:03 PM Re: use of a dll
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:


But my DLL haven't the functions for Registration.




(emphasis on MY)
I think this is where all the confusion began. I believe it is not HIS DLL as in HE did not create it and that he is trying to work with a DLL that is not exposed to KiX.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 2 12>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1574 anonymous users online.
Newest Members
BeeEm, min_seow, Audio, Hoschi, Comet
17882 Registered Users

Generated in 0.067 seconds in which 0.022 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org