01-25-2012 11:59 AM
Ok, I have this code that was modified from code supplied by the camera manufacturer. It works as a project as specified, however after setting up the project and compiling the code it does not work properly. The .exe code runs, but it does not appear to connect or open the .net server to the camera.
Any help would be appreciated.
mark
01-25-2012 01:40 PM
I'm not sure how you expect us to help. You've provided no code, or explained what this .NET interface is, or what you are providing to that specific method, or how you are getting the values that you are providing to that method. We are not mind readers.
Check the values that you are providing to the method. I don't know what else I can say beyond that.
01-25-2012 03:21 PM
never might, I'll wait for somemone nice... wow? thanks for making feel like a jack ars! I quess I would be using this forum again...
01-25-2012 04:35 PM
Have you already run a search for that error? I'm not a .NET expert, but my understanding is that LabVIEW is sometimes able to locate .NET DLLs when running in the development environment but can't find them in an EXE. Putting the DLL (and possibly any other custom DLLs that it requires) in the same directory as the executable may solve this problem, see this thread: http://forums.ni.com/t5/LabVIEW/Net-Error-1172-when-EXE-built/m-p/1036515
Without details it's going to be impossible to provide you with more assistance; from the information you provided, all we can do is offer generic solutions to .NET problems.
01-25-2012 04:38 PM
I think you misread the intention of my response. I wasn't being mean. I was expressing helplessness at figuring out how to try to help you. Basically, you said: "I'm calling this method. I'm not explaining what it does, or how it works, or what inputs I'm providing, or providing any documentation, or any code. I have this error. What's the cause?" Now, if someone came to you with that, how would you be able to tell them what's wrong?
01-25-2012 04:40 PM
@nathand wrote:
Have you already run a search for that error? I'm not a .NET expert, but my understanding is that LabVIEW is sometimes able to locate .NET DLLs when running in the development environment but can't find them in an EXE.
That does not appear to be the case here, since the method is basically saying "you gave me bogus information, so I'm going to generate an error". Thus, the assembly was actually found and run.
01-27-2012 03:02 PM - edited 01-27-2012 03:09 PM
ok, thanks for responding. The dierectory location does not appear to help. The error 1172 occurs when I press the start button in the GUI, but I beleive that is only symptom of the .net server not starting properly. Here is why I say this.
1. When I run the project file, it opens the BeamGage Software program and creates a connection to it such that vi operates. Start or stop data acq, perform a calibration, and stop the connection to the server.
2. It works the same when I use the factory supplied .exe file.
3. After I compile the program, and it compiles with not errors. I run the .exe. The vi opens but it does not start the BeamGage program nor create a connection to it. So somehow (I suspect) the DLLs are not being invoked. I moved the DLL around and they're now "Always Included" in the build specification. Maybe, something to do with the directory structure, or I'm missing a DLL that I don't know I need?
oh yeah, i attached some files to look at, just in case...
Thanks
01-30-2012 07:37 PM
Hey Mark,
I have a couple of suggestions:
Regards,
Kira T
01-31-2012 09:53 AM
- It was checked, but I don't recall checking myself.
2. Try to register the DLL with the Global Assembly Cash. To do this drag and drop the DLL into c:\Windows\assembly. Windows will automatically register it with the GAC. Now go through your code and point to the instance of the DLL located in Assembly not in the local folder, the way you have done previously.
- I will try this,
02-23-2012 06:34 PM
I'm not sure if this is still a problem for you, but I have also been playing around with the Spiricon BeamGage tools, and it seems like two things are required to run an EXE:
1 - Copy the "BGPTotalPeakExample_xXX.exe.config" file found in the Spiricon example code to the same directory as your application. Rename it to "MyApplicationName.exe.config" where MyApplicationName is the name of, well, your application.
2 - Right click on your EXE, select and select "Properties". In the "Compatibility" tab check the "Run this application as an administrator" option.