Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to return numeric value from VB.NET console applicat
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00797224
Message ID:
00798071
Views:
34
>As per subject line. :)
>The VB.NET console application is supposed to return the numeric code value to the Zeke scheduler application.
>Any ideas?

I was able to do it the most straightforward way:
I converted Sub Main into Function Main and returned the code from it.
In simplified form:
Public Class Main

    Friend Shared returnCode As Integer = 0

    Public Shared Function Main() As Integer
       ' Start processing here
       Return returnCode
    End Function
End Class
The processing is wrapped in Try... Catch so, in case of the error the error handling code sets returnCode variable to appropriate value in addition to saving the related error info into the log file. The external scheduler application can read the return value from OS ERRORLEVEL variable.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform