Jump to content
Xtreme .Net Talk

baby_vb

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by baby_vb

  1. Oh my goodness. Yes it was that. I forgot to instantiate. *blush* Thank you very much.
  2. Ok I'll try it
  3. Hi all, I'm trying to call an executable from my VB application, like this: psi.FileName = "program.exe" psi.Arguments = sArgs 'sArgs is a string from a text box psi.WorkingDirectory= "C:\MATLAB6p\bin\newwork\Optimize_subs" p = Process.Start(psi) except when I call it, I get this error: An unhandled exception of type 'System.NullReferenceException' occurred in Project1.exe Additional information: Object reference not set to an instance of an object. and the debugger points to the line where the file name is declared. Is this a program in the executable with the way it's receiving the parameter string, or is the executable not getting called at all, I was thinking maybe a problem with the working directory (yes, the exe is in the right folder). Does anyone know? Thanks! :)
  4. But if you do that and there are several different arrays with no predetermined number of elements in any of them, how do you know which arguments belong to which arraysk i.e. 1 23 5 65 8 4 67 34 could be parsed as {1 23 5 65} {8 4 67 34} or {1 23} {5 65 8 4 67 34} etc
  5. I'm using System.Diagnostics.ProcessStartInfo but I want to send more than 1 argument to my process, and some of them are integer arrays. If I have several arrays that I want to send, how do I delimit the different indices of the array from the different arguments, or is there an easy, simple way to send multiple arguments in ProcessStartInfo?
  6. What? If I put the executable in the solution folder it will be included when I deploy?
  7. I wrote a program in Matlab and made it an .exe. I want to write a wrapper program with a GUI in VB.NET for my executable so I can eventually deploy it. If I use System.Diagnostics.Process.Start to call my .exe it seems that I need to set an absolute path to it. Ideally I'd like to be able to add the exe to the VB project so that I can deploy the whole end product as one package. Is this possible, and if not, can I at least set a relative path? Or does anyone have any other suggestions on what to do? :confused: Thanks!
  8. The DLL is called through a .NET reference. And I never did figure out why they defined a baud rate as an unsigned integer type, instead of regular old integer. In any case, thanks VolteFace, your code worked great! :D
  9. Can someone please tell me how to use a UInt32 type and access and set its values? I'm trying to call a DLL method that has one of its parameters as a UInt32 type. The parameter is just the baud rate of a connection I'm setting up, so I want to set or hard code that value somewhere before it's called. But how do I pass the value in if the method is expecting a UInt32? Thank you for helping
×
×
  • Create New...