Dear visitor, welcome to Jabaco - Community.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
How to use static method?
Hello,
I have the followinf code that barks telling me that static method expected :
|
Jabaco Source
|
1
2
3
|
Public Sub Form_Load()
msgbox com#sun#security#auth#module#NTSystem.getDomain()
End Sub
|
How can I make this code running please?
Thanks
easy fix?
Hi,
just replace the "." by a "#":
msgbox com#sun#security#auth#module#NTSystem#getDomain()
Cheers!
A1880
Hello,
@A1880 fast richtig
# -> expects a namespace but "getDomain" is a function
@Gerome
why not using an object variable?
this works on my computer:
|
Jabaco Source
|
1
2
3
4
|
Dim s As String
Dim sys As New com#sun#security#auth#module#NTSystem
s = sys.getDomain
MsgBox s
|
greetings
OlimilO
Yes, you're right!
My "solution" works without error. But the resulting string is always empty, which is not useful per se
Sorry for this sloppy advice!
A1880