最近寫的程式需要能多重執行
因此找到了這個資訊分享給大家
可能有人知道了吧
在執行檔產生的ini檔加入
allowmultipleinstances = TRUE
如此就可以多重執行
而且每個執行的程序都是獨立的
詳細參考
以下引用原文
Problem:
Applications that I build in LabVIEW are singletons, i.e., I can only have one instance open at a time. If I double-click the executable while an instance is already running, it simply opens up the already running executable.
Can I run multiple instances of a LabVIEW executable simultaneously?
Solution:
Yes, it is possible to run multiple instances of a LabVIEW executable at the same time.
To do this you will need to add a line to the ini config file that is created after running a LabVIEW executable. When a LabVIEW executable is run for the first time, it creates an ini file in the same directory as, and with the same name as, the executable itself. By adding this line to the ini file, you can enable launching multiple instances of the corresponding executable. The line is:
allowmultipleinstances = TRUE
Following are the steps to accomplish this:
orange110840385.4336574074
Applications that I build in LabVIEW are singletons, i.e., I can only have one instance open at a time. If I double-click the executable while an instance is already running, it simply opens up the already running executable.
Can I run multiple instances of a LabVIEW executable simultaneously?
Solution:
Yes, it is possible to run multiple instances of a LabVIEW executable at the same time.
To do this you will need to add a line to the ini config file that is created after running a LabVIEW executable. When a LabVIEW executable is run for the first time, it creates an ini file in the same directory as, and with the same name as, the executable itself. By adding this line to the ini file, you can enable launching multiple instances of the corresponding executable. The line is:
allowmultipleinstances = TRUE
Following are the steps to accomplish this:
- Build a LabVIEW executable
- Run the executable one time. Observe that an ini config file is created in the same directory as the executable
- Close the execution of the application and open the configuration ini file
- Add the following line to the ini file beneath the [<Application_Title>] line, where<Appliction_Title> is the name of your executable:
allowmultipleinstances = TRUE - Save and close the ini file.
- You can now run multiple instances of this application simultaneously