Problem:
Ich habe eine DLL (GSSocket.dll) ohne *.lib und ohne *.h File.
Erstes Problem gelöst (hoffe ich):
GSSocket.lib habe ich mittels ImpLib32 erstellt (alternativ über /dumpbin und /lib).
Zweites Problem (und ich bin einfach keine Programmierleuchte):
Wie sieht mein Header-File aus?
Folgende Infos habe ich:
*** GSSocket COM Component ***
The GSSocket.dll is a COM based dll used to provide ASP with some Sockets API functionality.
Installation:
*******************************************************************************************
This COM dll works with IIS and PWS (versions that support ASP). If you have never
installed an ASP based COM dll, follow these instructions:
1. Click on the Windows "Start" button.
2. Click on the "Run..." menu item.
3. Determine the path to "regsvr32.exe". (ie: c:\\windows\\system\\inetsrv\\regsvr32.exe)
4. Determine the path to "GSSocket.dll". (ie: c:\\foo\\GSSocket.dll)
5. Type the path to "regsvr32.exe", a space, then the path to "GSSocket.dll" and then click
the "OK" button. As an example, if your path to your GSSocket COM was "c:\\foo\\GSSocket.dll" and
the path to "regsvr32.exe" was "c:\\windows\\system\\inetsrv\\regsvr32.exe" you would type
"c:\\windows\\system\\inetsrv\\regsvr32.exe c:\\foo\\GSSocket.dll" in the "Run..." dialog. On most
systems you will not need to determine the path of "regsvr32.exe" if the PATH environment
variable is set for the directory that contains it. In this case you simply can type
"regsvr32.exe c:\\foo\\GSSocket.dll" in the "Run.." dialog.
Component Details:
*******************************************************************************************
OBJECT: GSSocket
INTERFACE: GSSocket.TCPSock
METHODS:
-------------------------------------------------------------------------------------------
Return Value Method Name Parameters Purpose
-------------------------------------------------------------------------------------------
String Connect strAddress, PortNum Connect to a listening socket.
String Send strBuffer Sends data in strBuffer.
String Recv none Returns any data received.
none Close none Closes the TCP connection.
INTERFACE: GSSocket.UDPSock
METHODS:
-------------------------------------------------------------------------------------------
Return Value Method Name Parameters Purpose
-------------------------------------------------------------------------------------------
String Send strAddr, PortNum, strBuffer Send UDP data.
String Recv strAddr, PortNum Returns any received UDP data.
Usage Example (VBScript):
*******************************************************************************************
Result = ""
Data = ""
\'Create a TCPSock object.
Set tcp = Server.CreateObject("GSSocket.TCPSock")
\'Could use an IP or hostname string for the address.
Result = tcp.Connect("10.1.7.2", 1234)
If Result "OK" Then
Response.Write(Result & "
")
End If
\'Send some data...
Result = tcp.Send("My data is this string.")
If Result "OK" Then
Response.Write(Result & "
")
End If
\'Receive data that is returned, if the remote host actually returns anything!.
Result = tcp.Recv
If InStr(Result, "ERROR:") Then
Response.Write(Result & "
")
Else
Data = Result
End If
tcp.Close
Set tcp = Nothing
%>
Drittes Problem:
Das Headerfile wird mittels include in mein c-file eingebunden.
Kann ich dann ganz normal mit
GSSocket.UDPSock.Send(IP, PORT, Message),
diese Funktion nutzen?
Dumme fragen, ich weiss....
Kann jemand helfen
Danke
Jens