VS 2010 Set Program's Affinity To Be Able To Run On All Cores?
Jun 22, 2012
How do I set my program's affinity to be able to run on all cores?
Yes, I know the default is all cores, but I want to know how to set it in code.
Currently, I use:
Process.GetCurrentProcess.ProcessorAffinity = CType(Environment.ProcessorCount + 1, IntPtr)
View 2 Replies
ADVERTISEMENT
Nov 5, 2009
In my application I has a feature to set CPU application affinity for the application. I have a combo box with the following items:
Item 0: "ALL" -> It's point that if select the application will use all available CPUs
Item 1: "1" -> For set application to use first core
Item 2: "2" -> For set application to use second core
...
Item N....
Where N is the total numbers of CPUs/cores available in the system.
Now when the user click in one of this I execute this
Private Sub comboCPUAffinity_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comboCPUAffinity.SelectedIndexChanged
Dim num As Integer = comboCPUAffinity.Items.Count - 1
[Code]....
This works well in my vista 2-cpu machine, and also in 1 core machines. The problem is that I have release the application and has a user who has a 64bits vista 4 cores machine, and when execute the above code the application causes a buffer overflow. This is maybe because I have something bad in the code which can not test because I have not the machine to test.
View 6 Replies
Mar 6, 2012
If i want my program to exploit all cores of a processor do i need to add extra code? If yes do you know a link to a tutorial that explain how to do it in VB 2010?
View 10 Replies
Nov 28, 2009
Basically i want to know if the visual studio IDE and/or compiler in 2010 and 2012 was written to make use of a multi core environment (i understand we can target multi core environments in all versions using parallelism, but that is not my question).I am trying to decide on if i should get a higher clock dual core or a lower clock quad core, as i want to try and figure out which processor will give me the absolute best possible experience with Visual Studio 2010 or 2012 (v11) (ide and background compiler).
If they are running the most important section (background compiler and other ide tasks) in one core, then the core will get cut off quicker if running a quad core, especially if background compiler is the heaviest task, i would imagine this would be difficult to separate in more than one process, so even if it uses multi cores you might still be better off with going for a higher clock CPU if the majority of the processing is still bound to occur in one core (i.e. the most significant part of the VS environment).
View 6 Replies
Jun 2, 2010
I have a feeling the answer to this is no, but using .Net 4.0's Parallelism, can you set the amount of cores on which to run i.e. if your running a Quad Core, can you set your Application to only use 2 of them?
View 1 Replies
Apr 2, 2012
I am doing a bit of Office Automation and when printing a .doc file using VB.NET Office reference DLLs it causes great CPU load so I want to limit those processes to only use a single virtual core. I haven't been able to find anything in Microsoft's documentation about this.
This is the code I am using to print
Dim oWordApp As Word.Application
Dim oTargetDoc As Word.Document
oWordApp = New Word.Application
Select Case SQLdr("Priority")
[Code] .....
View 1 Replies
Jun 14, 2011
For setting my processor affinity mask and I need my process handle for this. How do I get it?
View 3 Replies
Jun 11, 2009
I am trying to create an application that will identify a process using over 50% of the CPU and set its affinity to run only on core 0. How should I go about creating this? P.S. I am trying to create this application because my PC has been creating this really anoying screaching sound when a process randomly uses over 50% of my CPU. (I have a dual-core, AMD sadly.)
View 2 Replies
Nov 29, 2011
I was going to hijack another, related, thread to ask this, but I figured it derserved its own thread.The question I have is whether or not anybody has done sufficient testing to show whether a mutlithreaded program running on a multi-core system will spread the threads across all available cores, or whether it has some affinity for the core used by the main process (UI thread, or whatever it may be)? The reason I ask is because I remember a discussion over in General Computing where somebody showed that, for at least one case, all the threads were splitting time on a single core of a multi-core processor. I am wondering if that is the typical behavior, or an isolated case?
View 23 Replies
Jan 23, 2012
I am calling a function from a VB.NET webserver to a custom written unmanaged DLL.If we call this DLL via a webservice on a multi-core server we run into problems and it always crashes.If I reboot the server and make it only use a single-core, it always runs fine and never crashes.I know the DLL call is responsible for the crash as I have outputted debugging code just before and after the DLL call.I can force the processor affinity of the .NET code to 1 core but this doesn't apply to the unmanaged DLL.How can I force the unmanaged DLL to only run on a single core as I am sure this will solve the problem?
View 1 Replies
May 5, 2012
is it possible by 1 program to save settings to another program without running the program that is being edited?
View 6 Replies
Jun 6, 2012
I wrote this VB program to be able to throw a device we developed into programming mode where we use an ATMEL Flip installer to upload new firmware. I can program one device after another running the application off of Visual Studio Express 2010 or Visual Studio 2010, but when I go to publish this file and run it on another machine, it becomes unstable and crashes after each upload. On those same computers if I run the raw unpackaged program under Visual Studio Express, the system does not crash, and I can program devices repeatedly.
View 5 Replies
Sep 26, 2011
I've been working on a program that generates a batch file, then when you press a button, it executes that batch file. There are multiple batch files attached to each item in the list box.
[code]...
The only thing that it does when I press the button, is starts the batch file, then goes to function searchtitle, which executes the batch file again when it finds out it didn't work properly.The button text doesn't change, none of the items are being added to my first list box, and I can't do anything to the window after pressing the button. It constantly opens the batch file every 5 seconds or so.
View 2 Replies
Apr 14, 2011
The program allows users to insert Documents along with a bunch of their attributes into the program. The documents are stored in a relational database. One of the required functionalities is allowing the user to look for such documents. The User normally search directly for the obvious attributes of the document, like a unique ID, or it's Title. The problem is that from the search parameters is not allways known which ones will the user fill. For example the user inserts the name and version of the deocument, another time the user enters part of the Title and the person that delivered the document, or might just enter the document number and nothing else. Some of the data might even be incomplete, like title, name of the person who created the document and so on. The idea from the person who designed the system (I'm only reimplementing it) was to allow easier searches for the user, and allowing the user to search for more parameters tod with the idea that "the more parameters, the more specific results", since the results are always group of documents instead of single documents.
View 14 Replies
Jan 28, 2009
My program will need to store some settings for when the program gets closed then opened again. I would then like to reload the settings?
- Flat file
- Database
- Registry
- Other
View 1 Replies
Apr 2, 2011
I'm really new at programming and was looking for guidance about a project I have.I have to design a program that administers a multiple choice test to users. It delivers questions one at a time, from a predefined test file for the user to answer. It also marks and displays a score at the end of the test.
First, a QUESTION form verify's the user's registration status and access. The user provides a registration number and password and the program reads it from a "registration.txt" file to determine if the user is eligible to take the test (i.e., they are registered to take it). If it is correct, then the user presses the "Begin" button. If not, then a message appears and the student tries again to enter the information.
A read only text box will display the score at the end of the test (String with format correct/total) and the user can't retake the test.Second, a QUESTION form opens after clicking "Begin" on the entry form. The questions are going to be from a "testfile.txt" file.Each question is on multiple lines in the file. The first line consists of the question followed by possible answers followed by the correct answer ( 3 items are separated by "#"). The current question number and the question will be displayed in textboxes.'n'= possible answers; so each of the next 'n' lines provides a possible answer. All possible answers will be displayed in a Listbox.After the user selects an answer, an ''Enter'' button is pressed. This will submit and evaluate the answer. If nothing is selected a textbox should appear and display the error message (APPEARS ONLY IF THERE IS AN ERROR). After pressing ''Enter'', the next question is displayed.When all questions answered, the entry form is displayed again and displays the score.
I know that's a lot of information, but I wanted it to be really clear. Would it be best to cycle/loop the questions with a DoWhile loop? And how would I store the answers while the user goes through the test?
View 7 Replies
Mar 12, 2011
I want to associate my program with a certain filetype. I know how to do this, but my question is: how i can i see witch file is opened?
View 1 Replies
Jan 12, 2011
How can I convert a C# 2010 project to VB2010?
View 3 Replies
Aug 4, 2011
VB.Net 2010 program .exe on PC with Excel 2007 gives error when cannot find Excel version 14, which is Excel 2010 I have developed a program in VB.Net 2010 which reads from an Excel spreadsheet. It works fine in the IDE on my computer. I built an .msi and executed it on my computer. I get "Error: 53 - Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral,PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified."
The only version of Excel on my computer is 2007, which is version 12.0.6557.5000. The version the error says it needs, version 14, is actually the version of Excel 2010.I have put in MsgBox statements to find where the error occurs.
[Code]...
View 2 Replies
Dec 20, 2011
I am currently working on a family project which is based on "Who Wants To Be A Millionaire?" show. There is a huge diffrence between the show and my project. My project is a christmas edition and the goal is not to get money or something, since I will not add it... Erhmm... Let me get to the point. I have already designed a layout and scripted some things. I have about thirty questions but I do not want them to always spawn in the same array, if you know what I mean. I want the program to randomly choose one of those thirty questions and NEVER choose the same question in the same program run. By the way, there are four options on my project: A, B, C and D. I have got everything, I just need a code.
View 3 Replies
Apr 3, 2011
How can I use IE8 in VS 2010? It is using IE7..
View 2 Replies
Jan 8, 2011
I'm making a Sudoku program and I want it to be able to do 3 things:Generate a new, Valid Sudoku Check Exsisting Sudoku for Errors Solve Exsisting Sudoku This will be My Interface
what I have So far:my GUI and the text boxes only accept 1-9 Now I have never programed something that uses this type of logic (chess,reversi,sudoku) so i don't know how to start and since i'm newish with programming, oop and vb.net i think i need a little help(or a lot)
What I was thinking is I need to make one class for almost everything lets call it Sudoku and it should be able to get numbers from text boxes store in a efficient way(maybe an array of array, or List of sorts)
It should also contain methods that can solve and check and generate sudoku's
View 6 Replies
Feb 10, 2012
My program check the license connecting to my data base. I have several customers with VPS.
View 2 Replies
Jul 26, 2010
I'm developing radio player in vb2010. I added some channels but i want to know how to do to offer the possibility to the user to add channels. I want the channels to be added as linklabel in a groupbox (groupbox3 in my case).
I want to do something like this: i press the "add new channel..." button, a new windows will be open. That windows must say: Enter a name for the channel and enter an URL for the channel. After that my channel will be added to groupbox3 in my case. I need my channels list to be saved.How can i do that, how do i offer the possibility to the user to add new channels, then how i save my channels list?
View 6 Replies
Mar 23, 2012
I use vb2010 to create a program, when I debug the program everything works fine, even when I run the program from the projects folder.
But when I installed it using installaware, the program doesn't run (even if I run as administrator).
View 12 Replies
Oct 2, 2010
My name is malky, a programming student currently learning visual basic 2010. I mostly know basic level of programmming (such as playing around with textboxes and such) and for my next project, I need to be able to call an executable file (the On Screen Keyboard to be exact) as my program first loads.
View 18 Replies
Jul 20, 2011
I have been given the task of converting an old program from Vb 5 that needs to be able to run in VB2010. I have read a few forums on the subject but whatever I try doesn't work. The .bas files convert over fine and the code from the forms comes over, but the forms do not appear. Instead there is a bunch of gibberish. How can I convert this? I tried going to version 6, which the forms worked in, and then to 2010, but I couldn't get the vbp file to show up or the forms.
View 1 Replies
Jun 21, 2010
I am writing a program that will need to edit an XML file and replace it with new data. I currently have working code using XMLWriter functions, but the problem is that it rewrites the whole file, deleting anything it didn't write that time around. I am assuming I either need to use a different function in XMLWriter or use a different method than XMLWriter.[code]...
View 7 Replies
Jul 8, 2011
Okay i know this is a noob question but what is the code for opening a program through visual basics 2010?
View 1 Replies
Jan 29, 2012
I want to add Hunspell spellchecking to my program
I have downloaded Hunspellx86.dll and Nhunspell.dll.
When I try to register the dll's using Regsvr32 I get the message "The ...(module)... was loaded but the entry-point DllRegisterServer was not found"
According to MSDN this means that they are not dll's!!
View 4 Replies