call a dll from a ilogic rule

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
okay, I created this Public class and Public function vb project
Public Class ClassNCupload
PublicFunction ncload(ByVal strNcName As String) AsString
Dim y AsNew WPNCTR.NCTRService
Dim result As String
Dim strErrDesc AsString = ""
Try
result = y.NCTransfer(strNcName, strErrDesc)
If result = "000"Then
MsgBox("NC upload successful")
Else
MsgBox("Error in WPNCTR - "& result & vbCrLf & strErrDesc)
EndIf
Catch ex AsException
MsgBox(ex.Message.ToString & vbCrLf & vbCrLf & ex.ToString)
Finally
EndTry
EndFunction
End Class
then compiled it as a dll NCupload.dll
This is a simplified version of my external rule
Add Reference "NCupload.dll
Sub Main
Dim strNcName As String
strNcName = "my string"
' now here i want to call the NCupload.dll , pass the value of strNcName to the dll and have it run
' anyone poin
End Sub
Can anyone explain how i call the dll and pass the string variable value
thanks