Identify The X64 Or X86 Of The OS And A Process In Managed Code?

Jan 24, 2010

How to identify the x64 or x86 of the OS and a Process in managed code?

View 1 Replies


ADVERTISEMENT

Identify And Kill Process?

Dec 22, 2007

Let's say i create 3 different process like this:

For i = 1 To 3
im pr As New Process
pr.StartInfo.UseShellExecute = True

[code].....

View 8 Replies

Identify A Process That Is Executing But Has An Error?

Sep 22, 2010

We have several programs that run during off hours and I want to write a program to monitor them. I have defined a list of priority programs and have written code to verify that they are running using 'Dim instance As Process'. The problem is that I can't figure out how to determine if the program has a pop-up error window like "unhandled exception" or similar window. The instance.responding still shows 'true'. How can I identify a process that is executing but has an error?

View 2 Replies

Start Another EXE In Managed Code?

Apr 10, 2009

Is it possible to start another EXE in Managed Code? At this time, all I can do is use:

System.Diagnostics.Process.Start(exeName)

Is there another way to call another EXE within the same project?

View 4 Replies

.net - Pass COM Array To Managed Code?

Apr 7, 2011

I have a .Net application (VB in particular, although I would this to be as language agnostic as possible) that uses a COM object (made in C++). I need to implement a event in COM that passes a char array from C++ to .Net. I guess I need to convert the array to a managed array; How can I do this?

View 2 Replies

C++ Unmanaged Code Versus Managed .net?

Sep 19, 2010

I am trying to develop a dll in VisualStudio2005 in vb.net that will communicate with a spectrometer attached to the USB port of the computer.Now the dll exists in C++ and it works like a charm. It is unmanaged code.Now if I try to translate this code in VB.net (because our app is in VB and my boss wants it in VB for maintainability) I have problems.

First of all, I am trying to create a file to open that port. The code in C++ looks like below and it works. Needles to say I tried to call the C++ dll from our app and it works. If I call the vb dll it doesn't. It gives me "access denied" no matter what I tried. I am not sure if my CreateFile is wrong or it's .net. I read somewhere that I need a manifest file included in the dll? Has anyone experience something like this? Why would i get "ACCESS DENIED" all the time?

// close and clear current stuff
ClosePort();
swprintf( sDevice, L"\\?\usb#vid_0765&pid_%s#******#{%s}", Device, PRIVATE_IID_STR );

[code].....

View 4 Replies

Calling Managed Code From Unmanaged C

May 30, 2012

I need to write a DLL in C that is used a plugin for an existing application.The DLL has to be compiled by the Visual Studio 2008 compiler with the following options.[code]It's then linked to applications library's.What it actually needs to do and what's causing me the issues is that within one of the methods it needs to pull data from a sql server 2008 r2. From what I've seen today you wouldn't be able to do this directly in C as SQL Server past 2005 is designed to communicate with CLR languages( C#, C++, VB.Net).It was suggested that I handle all the database communication with a VB.Net dll and then call said function from within the C dll. Most of what I've found on the topic of calling managed dll's from unmanaged code has talked about pinvoke or com wrappers and mainly from the perspective of c++.

View 2 Replies

Marshalling Data Between Managed And Unmanaged Code?

Feb 19, 2010

I am having a problem marshaling data between managed and unmanaged code. So I need to inspect the data at the byte level. What I need to do is store a number, say 8 into a 4-byte integer then copy it to an array bytArray(4) and compare those bytes with other data. I also need to set up the same array and copy it to an integer variable.

View 2 Replies

Using Directx Managed Code - Get This Error Unhandled Exception Has Occurred In Your Application?

Feb 26, 2011

i am using directx in my form but my program cant load managed direct(i instal Microsoft SDK V 9.29.1962.0) AND SHOW THIS ERROR:
Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.Mixed mode assembly is built against version V1.1.4322" of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

View 8 Replies

Uniquely Identify A Device From The Code?

Feb 16, 2012

how to use a webcam to take a photo on a Windows Forms application,Now what I need, is to identify which device I'm using to take the photo, in case I ever happen to have two or more similar devices connected to the machine.Currently our setup involves an Asus EEE PC deployed at our location. The machine has an in-built webcam which we are using in the application as described above.Somewhere within this code below, the default device is being identified and selected for taking the pictures we need.

Imports System.Runtime.InteropServices
Public Class Form1
Const WM_CAP As Short = &H400S

[code]....

Now what I need is to find the code that does this identification, and then hardcode the device identity into that code so that if I ever attach another (USB) webcam to the machine in future, it does not inadvertently take a photo from the wrong webcam.

View 9 Replies

Link Datagridviews To Other Controls Like A Combobox, List View Or Even Another DatagridviewBecause Much Of The Code Is Managed By The IDE?

May 18, 2008

figure out a way to link datagridviews to other controls like a combobox, list view or even another datagridviewBecause much of the code is managed by the IDE, I was expecting an IDE approach to linking controls. Is this the case or do I have to modify the generated code to do what I want.An example would be to use a combobox to limit the number of entries in a datagridview etc

View 2 Replies

VS 2008 - Code To Distinguish The Picked Process From Process List?

Apr 24, 2011

i want a code that if a process that i picked is no match in a process list that process that i picked will start

View 4 Replies

Open A "data Link Properties" Dialog Using Managed Code

Jun 5, 2009

how to open a "data link properties" dialog using manged code

View 1 Replies

VS 2005 Windows Services - Process Is Listed As A SYSTEM Process Rather Than A Process Under User Name

Jun 4, 2009

I have written a windows service that is meant to launch a notepad when a specific action happens. The problem i have is that even though the service launches notepad, the actual notepad it self is NOT visible. I know that it has been launced because i can see the process in the task manager. By the way the process is listed as a SYSTEM process rather than a process under my user name (i believe that is because my process is a "LocalSystem" one).

View 4 Replies

Designer Cannot Process Code

Jul 19, 2010

I need some assistance again. In my previous posts, I asked about a good book to start learning how to us VB 2008.I had numerous replies, so I thought starting with Visual Basic 2008 would be a great start.As I am reading the book everything had mad sense up to Chapter 4. It's a simply program, and I thought I understood everything, until the middle of the chapter. So here's where I need help, and someone to explain my error.The author explains to place a Label & DateTimePicker onto the form, which I did. I renamed the label to NextWeek and DateTimePicker1 to DateChooser.Furthermore, I proceed to double click on DateChooser, which VB provides certain code automatically.[code]

After a few pages of reading, the author stated to put the following code under
Inherits class definition.[code]I went on and put the remainder of the code, which similar to the following:[code]The designer cannot process the code at line 51:Me. AutoScale Dimensions = New System.Drawing.SizseF(6.0!,13.0!)The code within the method 'Initilze Components' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.

View 4 Replies

Error - The Designer Cannot Process The Code At Line 118

May 7, 2010

I was working on my project (creating a new form), and when I switched from the code view back to the designer view, I got the following error:

The designer cannot process the code at line 118: Me.VDARSQLDATASET = New Veterinary_Digital_Anesthesia_Records.VDARSQLDATASET() The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.I am now getting this error on every page. This project has been working for months just fine, but for some reason the VDARSQLDATASET has dissapeared- kind of. I can still access the dataset (the file is still there), I just can't reference it in the code (intellisense can't find it).

View 2 Replies

Get Type (x64 Or X86) Of A Running Process In Macro Code?

Jan 22, 2010

I'm writing a macro to automate the process of attaching to the IIS worker process (w3wp.exe, Windows Server 2k8) from Visual Studio. The trouble is that I often two app pools running at any given time, one in x64 mode and one in x86 mode. This means there are two processes called w3wp.exe running at any given time, and the only way to distinguish between them is the mode they are running in. When I use the "Attach to Process" dialog, there is a "Type" column that shows that information so I know which w3wp.exe to attach to, but I can't figure out how to get that information in my macro.[code]....

View 1 Replies

Com Dll Vs Native Dll Vs Managed Dll?

May 3, 2010

What's the advantages of the above types of dll? Is there any other type?

View 1 Replies

How To Use Managed Callback

May 12, 2011

I am writing classes in VB.Net (both managed). The main class "A" creates an instance of "B". Class "B" must call a method of Class "A". I need to know two things (syntax, etc...):

1. How does class "A" tell class "B" what method to call?

2. How does class "B" call the method?

The method must pass back an array of Shorts (in this particular example), either as a return value, or as a ByRef argument.I don't want to use an event if I don't have to. The execution is timing critical. (I assume event handling involves a lot of overhead by the operating system, but I may be wrong.)

View 1 Replies

Cannot Debug Some Of The Code In Process W3wp.exe (Debugger Is Not Registered)?

Feb 24, 2012

Attempting to debug a VB.NET Visual Web Part I am receiving the following error message.This error happens straight after I press play and and prior to any of the code in my webpart actually executing. I have tried googling and just thinking through what this error might be referring to but can't come up with anything.

View 1 Replies

Sample Code For Remote Process/Application Monitoring?

Sep 23, 2010

I am looking for a bit of inspiration here, a client has requested me to build a simple remote process monitoring application with capability for smtp notification, when monitored processes go down or come back on-line. Can anyone point me in the direction of some sample code to get me started. I have briefly looked at .net remoting as a potential development path, from my understanding of how this works, the remoting architecture would require both a client and remote server component, (though I am not a 100% sure on this one), however if this is the case, then it will not fit the bill, as one of the fundamental requirements is that no additional software can be deployed on the servers which are to be monitored

View 1 Replies

Thought Process Used To Turn Users Specs Into Code

Mar 6, 2012

I'm tutoring a student in VB 2010 at a local college.i'm trying to explain to the student that he needs to learn the technique or art of knowing how to start coding in VB to accommodate a simple forms program.Is there a name or term that is used to describe the thought process a programmer goes through to convert what the user is expecting into the code that needs to be implemented to accomplish the task?A simple example is a form with a textbox on it and an OK button.When the user clicks the OK button, the program should check the textbox to make sure it is a number and not alphanumeric.The student I am tutoring has a hard time knowing what the first line of code should be to make that kind of test.He has a problem translating what needs to be done into code.I was wondering if anybody knows what that is called and if there is anything written about it.

View 15 Replies

Managed Alternative For GetBestInterface?

Apr 27, 2012

I have absolutely no background on programming in C (or any other unmanaged languages for that matter) yet I would like to use the GetBestInterface function from the IP Helper API in my .NET application. I tried to understand how P/invoke calls can be used to make calls to native methods, but there are many things that just don't make sense to me (like how types in managed code map to unmanaged types).

Is there an alternative function somewhere hidden in the System.Net namespace that does roughly the same thing? Or could I write my own alternative using existing base classes combined with some magic? Because that's basically what it seems to me: magic. There is no real explanation for how the method accomplishes what it does as far as I can tell...

I just discovered the LocalEndPoint property on the System.Net.Sockets.Socket class which I think could be quite useful in this. To my understanding it will do the best-interface-picking on my behalf and I'll just need to get the NIC that corresponds to the local endpoint.

View 1 Replies

Managed Memory Leak?

Jun 13, 2006

I am having a very strange memory leak that seems related to databinding. It is very hard to reproduce, so I won't post any code here to do so, but will just describe the problem.We have data entry forms which have controls which bind to custom business objects through a BindingSource object.

View 7 Replies

VS 2010 Managed Thread?

Jun 20, 2012

Is there anyway to create an OS or Managed thread, so that it can never be interrupted. Thread/Process priorities are not enough.

View 2 Replies

Checking The Return Code Set By A Task / Thread / Process / Program?

Apr 16, 2010

A long time ago, on a PC far, far away from Windows, one MS-DOS program (the father) could run / execute / spawn another MS-DOS program (the son). When the son terminated, it could set a return code which could certainly be interrogated by an MS-DOS batch program or, I think, by any father program that invoked it (depending on the language in which that program was written). I have a small utilility which I want to invoke from my application, and, since that utility sets a return code, I would like to interrogate it in my application when the utility terminates. I've looked through the MSDN Library but could not find anything that seemed to cover this situation. Is there a way to do this in Visual Basic 2008 Express

View 2 Replies

.net - How GroupBox Control Size Can Be Managed

Jun 12, 2012

I have event Button that creates text box in run time.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim textbox1 As New TextBox
static Dim shiftDown As Integer
static Dim counter As Integer

[code]....

All the text boxes that has been created displayed in GroupBox control dynamically. how GroupBox control size can be managed according to quantity controls inside it.

View 1 Replies

C# - Finalizers Accessing Managed Stuff

Jul 26, 2010

I am well aware that finalizers are typically used to control unmanaged resources. Under what circumstances may a finalizer deal with managed ones? My understanding is that presence in the finalizer queue will prevent any object, or objects strongly referenced thereby, from being collected, but it will not (of course) protect them from finalization. In the normal course of events, once an object is finalized it will be removed from the queue and any objects it references will no longer be protected from collection on the next GC pass. By the time a finalizer is called, the finalizers may have been called for any combination of objects referred to by the object; one cannot rely upon finalizers being called in any particular sequence, but the object references one holds should still be valid.

[Code]...

View 4 Replies

Dispose Managed Objects In 2008?

Jun 1, 2011

In My application, I have an MDI form. From MDI form I open all forms as child forms. I have implemented IDisposable for all large objects like file stream DB connection etc. In the Form_Disposed event I dispose all unmanaged objects. After the child form is closed, all unmanaged objects are disposed but managed objects (controls and form) are not disposed and still in memory. I find it from .Net Memory Profiler ([URL]).

So I have write code to remove all event handlers of all controls and form. Now, When form closed, dispose is called and all event handlers and controls are disposed, but controls and form are still in memory.

View 2 Replies

How Secure Is VB Rijndael Managed Encryption Or AES

Feb 11, 2012

I am using a slightly modified version of this code. to create a mission critical application. That files that will be encrypted are very important. This has to be done from scratch because there are some other things that has to be done along with this. How secure is this? Its impossible to crack this encryption right? [Code]

View 2 Replies







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