I currently have a Visual Basic .NET program that uses COM to communicate to some software I am automating. Part of the program requires reading a file line by line, checking for certain keywords, and storing some into String objects to be used by the software.
My problem lies with the slow speed of visual basic in reading and performing these tasks. I have been able to write exponentially faster functions in Visual C++ in order to complete these tasks but I know no way of connecting the two.
Is it possible to call VB .NET's Shell method to run my C++ code and return the three strings?
Something along the lines of:
Shell("cplusplus_Program.exe " + filename)
//and somehow return three strings
Would there be a better way? I have no experience in creating .dll's, but would this be more suited for my task?
EDIT 1: I have been told that VB.NET should work fine/quick to meet my goals if I use it correctly, so I went back and changed from the old COM object I was using to StreamReader. I use the ReadLine method and it is still very slow. From my research I have seen many fast ways to stream the whole text document at once, but I need to go line by line, as each string line I receive needs to be checked and possibly fixed (though my test case never actually needs fixing). In case it might play a large role with the speed, I check each string using the .IndexOf method