Set CPU Affinity For 4 Cores Machine?

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


ADVERTISEMENT

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

Using All Cores Of Multi-cores Processors In VB 2010?

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

C# - Setting The Cores To Use In Parallelism?

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

Office Automation And Process Affinity

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

Setting Processor Affinity Mask?

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

Asp.net - Was Visual Studio 2008, 2010 Or 2012 (v11) Written To Use Multi Cores

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

Creating An Application To Control Affinity Of Processes

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

Thread Affinity In Multi-core System?

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

Force A Specific Processor Affinity On An Unmanaged DLL Call From .NET?

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

Cannot Access The Database From Server Machine To Client Machine Using .net 3.5?

Dec 9, 2010

I develop an application using vb.net.application will run on client server architecture.when we try to execute the program in client side then it will give me an error which is related to sqlclientexception.how can i handle this situation.i used vb.net 3.5 as front end and sql server 2000 as back end.i have done total coding with system.data.sqlclient namespace.

View 6 Replies

.Net Software Behaves Differently From Machine To Machine?

Dec 21, 2010

I've inherited a lot of custom made software for an office, and, while managing it, I've found it performs differently from machine to machine.I mean, some controls get painted in weird ways in some machines but well in another, or just work differently, like in some machines clicking something selects it, and in the next machine clicking the same thing makes it editable.I suspect, o course, of the myriad of DLL the software loads

View 2 Replies

Blocking A Particular Machine From Accessing A Machine On LAN?

Jan 21, 2008

I want to block a perticular machine from accessing my machine..Both the machines are in LAN..I dont want a perticular machine to access my computer How can i achieve this...I want to do this using VB.NetAny idea....

View 9 Replies

Get Time On Another Machine?

Feb 20, 2009

i must get time on another machine and put it inside my windows application with vb.nethow can I

View 9 Replies

How To Use A COM Dll On A WIndows 7 64 Bit Machine

May 1, 2012

I have built a DLL for changing the default printer to a new value and then setting it back to the original. This DLL will be called from a VBA addon to an ERP product. I think the version of the VBA is 6.3.

I have built a Visual Basic 2008 Dll using a COM component. This generates a DLL and TLB file. Using Regasm.exe from the .net frameworkv2.0.50727 folder to successfully register these components on Windows XP and Window 7 32 bit.

However, when I try to do this on a Windows 7 64 bit system, it fails. After some fiddling around, I was able to get a successful registration using the Regasm.exe in framework64v2.0.50727. But after the successful registration, the VBA project still cannot use the DLL.

When I try to Reference the .tlb file in the VBA project, it is not visible even though the dialog filter is set to dll, tlb.If I try to use late binding by using the getobject and/or createObject method, it fails.

There are two ways to answer this request.1. How do I register my 32 bit COM dll on a Windows 7 64 bit machine?

2. How do I write a COM DLL component from scratch for a WIndows 7 64 bit machine using Visual Basic 2008 ( or 2010. I will upgrade if necessary)?

View 5 Replies

How To Use VB DLL Across All Users On Machine

Jul 17, 2009

How do I register a vb program dll for all the users of a machine? I have admin rights and have tried to register the dll using regsvr32 . Its get registered and is functioning only for my user id. If some one without admin rights come and login then it is not working.

View 1 Replies

Run 32 Bit Java Dll On 64 Bit Machine?

Mar 11, 2010

I have a 32-bit java dll which i need to call from a asp.net application on a 64-bit machine.

View 1 Replies

Will App Compiled On 64 Bit Run On 32 Bit Machine

Nov 20, 2010

I'm buying a new computer this week and the one I want has Windows 7 Home Edition 64 bit. I program in VB.NET using VS2008. If I write a program and compile on this 64 bit windows, will it run in 32 bit? I did some reading and from what I understand is if it is not using any specific 64 bit drivers I should be good. I'm not doing anything fancy that I know of as far as drivers. I just wanted to see what everyone's past experience has been.

View 3 Replies

.net - Get MAC Address Of Client Machine In C#?

Jan 7, 2010

How to get MAC address of client machine in c# and vb.net

View 3 Replies

.net - Using VB DLL In TWO Windows Project At The Same Machine?

Apr 4, 2011

I Have old vb windows application, we develop new .Net Application that uses the old VB DLL functions, for testing purposes I have to install the two application in one client machine,

BUT The Problem: When I install the new .Net and register the DLL , it works fine,,

-- But the old VB application Stops...

If i register the DLL again and run the VB application , it works fine...

-- But the new .Net Application not works,,

After Registering the DLL, the first Application I run works fine , the other NOT

View 1 Replies

2010 Deployment To 32 Bit Machine

Jul 20, 2011

If I develop a VB2010 Windows Forms application on a 64 bit machine, can I deploy it to a 32 bit machine?The 32 bit machine has .NET Framework 4 Extended on it.Or can I tell the 64 bit compiler to go 32 bit? I have VS Pro on the 64 bit machine.I don't want to leave any development package on the 32 bit machine, which will be transferred to a client.jeyoung

View 5 Replies

Add Cookies To The User's Machine?

Jan 17, 2011

I know HOW to use cookies, but how to do so in a Windows Forms Application? What reference would I need to add in order to add cookies to the user's machine?

View 1 Replies

API, Kernel32 On 64bit Machine?

Nov 7, 2010

coming from VB6 I've been using the windows API for many years. Now I'd lke to do the same on .NetMy question is, what would happen if I build for 'AnyCPU' and the application calls Kernel32 while running on a 64bit machine ?

View 1 Replies

Application Will Not Run On Same Machine It Was Written On

May 18, 2010

I have written a program and it seems to work fine when i am running it in the environment.When I create a program to distrubute to another computer it will not run.I thought it might be a problem with the other computer but I tried to install it on the same computer I designed it on and it will not run there either.When I run it a message box pops up saying "Application cannot be started. Contact to application vendor."[code]

View 5 Replies

Availability - Check If A Machine Is Available

Aug 8, 2009

USing c#, how can I check if a machine is available (i.e. switched on or exists) on the network?

View 2 Replies

Can Only Run Application On Build Machine

Jun 5, 2010

I've compiled my application and started testing it on other machines.

It crashes instantly on every machine except the build machine - I'm fairly new to programing so any pointers as to where I would start would be great.

If I install VS2008 on the test machines it runs fine...

I'm using VS2008 on Windows 7 (x64)

Application is set to compile x86

An entry is made in the event log:

EventType clr20r3, P1 5xhruzlemrj2jn2wizvzp1qaljyuxwtl, P2 1.0.0.0, P3 4c0abff3,
P4 ssmc program,

P5 1.0.0.0, P6 4c0abff3, P7 12, P8 e9, P9 system.invalidoperationexception, P10 NIL.

[URL]

View 3 Replies

Can't Seem To Copy 3 X CR9 Dll's To VSE Machine To Get Rid Of Errors

Sep 18, 2010

I'm converting an existing VB6 command line app to VB.net as need a bug or 2 fixed. It uses 3 x Crystal Reports 9 libraries. The only errors I have now are related to CR9 (dll) code, but don't have CR9 on the VSE machine, & dont have VSE on the CR9 machine. We also have a CR11 version of this. The fellow who created them has left & we dont have VB6, he used his own.I can't seem to copy the 3 x CR9 dll's to the VSE machine to get rid of the errors, says the dll access is denied, source file may be in use.I can't install VSE on the CR9 machine so have to create/build it on the VSE machine & copy exe to the CR9 machine. [code]

View 4 Replies

Capture When A Machine Is Idle?

Jan 21, 2009

Is it possible to capture when a machine is idle? I realize that a machine is never really idle, but screen savers work and power management schemes work... So, there must be a way to create an application to capture the same thing, correct?

Has any tried this or has any success capturing when a machine is idling?

View 6 Replies

Closing Machine After Program Has Run

Feb 3, 2010

is there "rules" as to how to close programs writting in vb.net(2008)? I've migrated to dot net from vb6 and have rewritten some of my programs in the new language, but I've discovered a problem, since using the new programs if you try and close the machine down (Windows XP) the pc just hangs until I use the task manager and kill my programs.

View 1 Replies

Compiling To Machine Code?

Apr 23, 2011

After reading a couple of tutorials, it seems that basically NET works quite like java. All the IDE's produce an intermediate code that I have to distribute, and which NET compiles at runtime to machine code and then executes it. Leaving aside the question why so when NET works only on Windows platforms, I have some other more practical questions:Is it possible to directly compile to machine code targeted at specific platform like XP 32-bit or Win7 64-bit?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved