Hello there,
i have a problem to integrate the scauto.dll into my asp.Net 2.0 Application.
I tried to update a vb6 project to .net but it doesn't work.
The connection is being established to SC. When I try to Create a event via scauto_create() the problem structure seems incorrectly passed to the function. Because of this, the scauto_query_ex function doesnt find a event for me.
Code:PrivateDeclareFunction scauto_connect Lib"scauto.dll" (ByVal id AsString, ByVal server AsString, ByVal events AsString, ByVal user AsString) AsInteger PrivateDeclareFunction scauto_disconnect Lib"scauto.dll" (ByVal id AsString) AsInteger PrivateDeclareFunction scauto_create Lib"scauto.dll" (ByVal id AsString, ByRef scevent As scauto_event) AsInteger PrivateDeclareFunction scauto_delete Lib"scauto.dll" (ByVal id AsString, ByRef scevent As scauto_event) AsInteger PrivateDeclareFunction scauto_error Lib"scauto.dll" (ByVal id AsString) AsInteger PrivateDeclareFunction scauto_query Lib"scauto.dll" (ByVal id AsString, ByVal startseq AsString, ByVal opt AsString, ByRef result As scauto_event_out) AsInteger PrivateDeclareFunction scauto_query_ex Lib"scauto.dll" (ByVal id AsString, ByVal startseq AsString, ByVal opts AsString) AsInteger PrivateDeclareFunction scauto_next Lib"scauto.dll" (ByVal id AsString, ByRef result As scauto_event_out) AsInteger PrivateDeclareFunction scauto_error_string Lib"scauto.dll" (ByVal error_Renamed AsInteger) AsInteger PrivateDeclareFunction scauto_version Lib"scauto.dll" () AsIntegerCode:Dim Problem AsNew scauto_event Problem.evtype = szEventTyp Problem.evsysseq = "" Problem.evusrseq = szUserSeq Problem.evtime = vbNullChar Problem.evuser = szUser Problem.evsepchar = "^" Problem.evfields = "Test1" & Problem.evsepchar & _ "Test2" & Problem.evsepchar & _ "16/10/2007 17:00:00" & Problem.evsepchar & _ szUser & Problem.evsepchar & _ "This is a Test " & DateTime.Now.ToString & Problem.evsepchar & _ "Text" & Problem.evsepchar & _ "PM-WIT" & Problem.evsepchar Dim createStatus AsInteger = 0 createStatus = scauto_create(szConnID, Problem) Dim queryStatus AsInteger = 0 queryStatus = scauto_query_ex(szConnID, "evusrseq=""" & szUserSeq & """", "wait")
Maybe someone has a working .Net Snippet for me ????


Reply With Quote
Bookmarks