call exe file in vb.net
-
i need to run a encryption and decryption algorithm which is written in c language and call the exe file in vb.net and show the output in form window.
-
i need to run a encryption and decryption algorithm which is written in c language and call the exe file in vb.net and show the output in form window.
You need to use DLLImport to use the encryption dll to make your program work in .NET. Here is an old article posted on CP: Creating and Calling C Function DLL from .NET[^] Hope it helps.
-
You need to use DLLImport to use the encryption dll to make your program work in .NET. Here is an old article posted on CP: Creating and Calling C Function DLL from .NET[^] Hope it helps.
Good link...
I quit being afraid when my first venture failed and the sky didn't fall down.
-
i need to run a encryption and decryption algorithm which is written in c language and call the exe file in vb.net and show the output in form window.
-
Good link...
I quit being afraid when my first venture failed and the sky didn't fall down.
you gave a -ive vote... :(
-
you gave a -ive vote... :(
prdshukla wrote:
you gave a -ive vote... :(
How do you know it was him? It could have been anybody.
Forgive your enemies - it messes with their heads
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
prdshukla wrote:
you gave a -ive vote... :(
How do you know it was him? It could have been anybody.
Forgive your enemies - it messes with their heads
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
yeah..you are right...but may be by mistake he may have done it.. :) The rating process is not very intuitive...
-
yeah..you are right...but may be by mistake he may have done it.. :) The rating process is not very intuitive...
How can Good Answer, Bad Answer not be intuitive? It's hard to see how it could be any easier. BTW - it looks like it was two people who didn't like your answer.
Forgive your enemies - it messes with their heads
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
You need to use DLLImport to use the encryption dll to make your program work in .NET. Here is an old article posted on CP: Creating and Calling C Function DLL from .NET[^] Hope it helps.
You may have received the 1s because he says it's an EXE, not a DLL.
-
i need to run a encryption and decryption algorithm which is written in c language and call the exe file in vb.net and show the output in form window.
<DllImport("E:\Temp\simple.dll", CallingConvention:="CallingConvention.Cdecl)"> _
Private Shared Sub ReturnInParam(ByRef Stan As Integer, _
ByRef Message As String)
End SubPrivate Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim Num As Integer = 8
Dim Message As String = "Harun"
ReturnInParam(Num, Message)
MessageBox.Show(Message)
End Sub -
i need to run a encryption and decryption algorithm which is written in c language and call the exe file in vb.net and show the output in form window.
You can run the exe in the shell, but I'm not sure about the cmd window. I didnt need it, but thi scode will scrape the hidden cmd box for the shel output, in whichyou can regex the return values.
Private Function Shell_Exceute_FLV(ByVal Parameters_FFMpeg As String) As String
Dim Context As HttpContext = HttpContext.Current Dim SB\_FFMpeg As StringBuilder = New StringBuilder Try Dim Results As String = Nothing Dim ffmpeg As New Process() Dim ffmpeg\_StartInfo As New ProcessStartInfo(Path\_FFMPEG, Parameters\_FFMpeg) ffmpeg\_StartInfo.UseShellExecute = False ffmpeg\_StartInfo.RedirectStandardError = True ffmpeg\_StartInfo.RedirectStandardOutput = True ffmpeg.StartInfo = ffmpeg\_StartInfo ffmpeg.Start() Dim ffmpeg\_StreamReader As IO.StreamReader = ffmpeg.StandardError SB\_FFMpeg = New StringBuilder() SB\_FFMpeg.Append(ffmpeg\_StreamReader.ReadToEnd().ToString()) Do While Not ffmpeg.WaitForExit(1000) SB\_FFMpeg.Append(ffmpeg\_StreamReader.ReadToEnd().ToString()) Loop If ffmpeg.ExitCode = 0 Then ffmpeg.Close() If Not ffmpeg\_StreamReader Is Nothing Then ffmpeg\_StreamReader.Close() End If Else ffmpeg.Close() If Not ffmpeg\_StreamReader Is Nothing Then ffmpeg\_StreamReader.Close() End If End If ffmpeg.Close() ffmpeg.Dispose() ffmpeg = Nothing Catch ex As Exception End Try Return SB\_FFMpeg.ToString
End Function