Does NaturalLogon work under Visual Basic 2005?


My organization is just starting out with EntireX. We’re using Visual Studio to create the interface and communicate with Natural on the mainframe.

Last year, one of our programmers created an example project using Visual Studio 2003. It contains the following initialization code:

’ ************************************************************
’ EntireX Initialization
’ ************************************************************
Private Function initialize()
_broker = New Broker(“ETBXXX:XXXX”, _globals.lgnUID)
_service = New Service(_broker, “RPC/DEVLRQC/CALLNAT”, “RQ”)
_service.Timeout = Convert.ToUInt32(20)
_service.UserIDAndPassword(_globals.lgnUID, _globals.lgnPswd)
_service.NaturalLogon = “Y”
End Function

I’m using Visual Basic 2005 and it is giving me an error on the “_service.NaturalLogon = “Y”” line.

The error message is “‘NaturalLogon’ is ambiguous because multiple kinds of members with this name exist in class ‘SoftwareAG.EntireX.NETWrapper.Runtime.Service’”

This code apparently worked under VB.NET 2003. Is there something new that needs to be added to make it work under VB.NET 2005?


Our VB guru found the answer for me. The _service_NaturalLogon() line needs to be replaced with CType(_service, Object).NaturalLogon = True.