Hi! I'm rather new to .Net, but not new to programming. I'm working on developing a web service that references a 3rd party DLL. The 3rd party has supplied both a win32 DLL and a .Net Binding (which includes a DLL written in C#). I added the C# DLL (.Net Binding) to the References of the web service. It shows up under the References folder, and I can browse all the functions, methods and members of the DLL. The problem comes in when I call a DLL function which takes a parameter of "type" defined by the DLL itself, and shown in a sample provided with the component. This seems strange. You would assume that if you are using a value specified by the binding in a call to a function defined by the binding, you shouldn't have any problem, but instead, I get the following error:
C:\iis\gcp\Service1.asmx.vb(80): Value of type 'Short' cannot be converted to 'GameStat.GameType'.
The value of parameter (GameStat.GameType.UnrealTournament2004) is an integer, but the DLL declares this of the type "type". I thought that maybe I'm missing some extra step that I need to do to get the web service to recognize this as it's defined type, but I don't know where to look. Here's a sample of my code:
Imports System.Web.Services
Imports GameStat
<System.Web.Services.WebService(Namespace:="http://localhost/gcp/gcp")> _
Public Class Primes
Inherits System.Web.Services.WebService
'
' generic .Net code replaced for brevity...
'
<WebMethod()> _
Public Function GetServerInfo(ByVal Host As String) As String
'Dim gs As GameStat
Dim gsInfo As GameStat.ServerInfo
gsInfo = GameStat.ServerInfo.Query(GameType.UnrealTournament2004, Host)
GetServerInfo = gsInfo.Map
End Function
End Class
The DLL and .Net Bindings can be found at http://www.int64.org/gamestat.html
Any ideas? Thanks!