You are not logged in.

  • "Gerome GUILLEMIN" started this thread

Posts: 14

Date of registration: Feb 16th 2009

  • Send private message

1

Friday, February 27th 2009, 10:30am

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

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

2

Friday, February 27th 2009, 11:30am

easy fix?

Hi,
just replace the "." by a "#":

msgbox com#sun#security#auth#module#NTSystem#getDomain()

Cheers!

A1880

OlimilO

Intermediate

  • "OlimilO" is male

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

3

Friday, February 27th 2009, 11:51am

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

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

4

Friday, February 27th 2009, 12:54pm

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

Rate this thread
WoltLab Burning Board