WIA Automation SDK And Multithreading?

Mar 11, 2010

I'm using the WIA Aut. Library [URL] trying to capture photos from 5 digital cameras (Nikon D90) USB-connected to my pc. Now, I partially achieved my goal, what I do is:

- loop through the attached devices, connecting to every camera;

- fotocamera.ExecuteCommand (WIA.CommandID.wiaCommandTakePicture) ;

- other image processing operations...

Everything works fine but... the workflow is camera1 -> connect -> grab pic. => camera 2 -> connect -> grab pic. => camera 3.....What I'd like is to make them shoot all at the same moment (...why? well, D90 waits around 1 sec. after a shoot... 1sec * 12 cameras * 500 photo sessions.. :'( )I told myself... what's the problem? You can create "shooting-threads" while looping through the device then launch 'em all.Done.It's still in a 'serial' way... :-(((Why? is executeCommand() a synchronized method? If I madly-fast click on two 'grab pictures' button of windows XP WIA dialog it works.. Is there something about .NET multithreading I don't know?

View 5 Replies


ADVERTISEMENT

Office Automation :: MultiThreading In MS Office 2007 (Excel, Outlook, Etc)?

Mar 28, 2011

i was wondering if someone could give me the final explanation on what i might be doing wrong here.I spent a lot of time reading around the net and the forum about how to add Threading capabilities to a VB project.

Nos, i've got .NET 4 installed, and i've added the system.tsr and mscorlib.dll files as reference in, say, Excel 2007 (see screenshot).However, when i try to make a thread with anything as basic as "Dim Thread1 As System.Threading.Thread", i get a user-defined type not found error.Indeed, when i use the object browser to see what's in the System file, theres nothing remotely linked to any Threading, and in the mscorlib file, nothing under "Threading" either, just a few Thread related functions, but nothing defining a data type

View 2 Replies

Web Browser Automation Automate Button Click And Automation Fill Textboxes Using IE Object

Jan 22, 2010

i am developing one automate application for tht i hav done some coding i dont know how to proceed further can any one guide me if possible? [code] I am using SHDocVw for IE. Now i need to know how to do. [code]

View 4 Replies

Office Automation :: Automatic Deployment Of Excel Automation Addin?

Jan 25, 2011

I have written an automation addin in Excel with C# (addin.dll). To use the addin, I need to 1. register it using "regasm /codebase c:...addin.dll"2. select in ExcelOptionsAddInsExcel AddinsAutomation the respective addin from the list

I would like to automatize 1) and 2), so that the user just needs to run an exe-file in order to use the addin. 1) should be no problem, but how can one automatize 2)?

View 12 Replies

Office Automation :: Excel 2003 Automation With VB 2005 Express?

Apr 20, 2010

Ok basically what I need to do is the following:Read FirstExcelDoc (attached)For every row in that: Retrieve data from sql server db based on info in the Orange columns of FirstExcelDoc Let's say I retrieved data elements A, B, C, D, and E from sql server. Then I need to enter those same data elements A, B, and C in another excel spreadsheet (which has formulas etc) After inputing A, B, and C in that spreadsheet, read a couple of calculated fields and compare those results to data elements D and E retrieved originally from SQL Server DB. Finally, output the results in the Blue columns of the FirstExcelDoc spreadsheet for that row.Loop through and do the same thing for row 2 of the FirstExcelDoc and keep on until you see "END TEST" in the FirstExcelDoc.

I'm looking for a method of doing this efficiently. I have read several articles over the past few days as well as those from Mike R. but just need some direction to get started on this.To start of I'm looking for whether to read the entire FirstExcelDoc spreadsheet or just read the info for first policy number(2nd row) and process it and write out the blue column info for that row and then loop through and come back and read the second policy number (3rd row) etc... Please attach a code snippet for either way of reading the data.

View 19 Replies

Office Automation :: Orphan Excel Process Started Via Automation

Jun 17, 2009

I'm using excel via interop in application.Sometimes users kill application that created excel instance and that results in excel instance sitting in memory without any chance of disposing it.First I tried to tackle this using ROT(running object table) looks like not all instances of excel are registered there.Than I tried to somehow mark excel process after it is started via interop.[code]This works as long as excel is visible but in my case excel window is invisible.All I need is to somehow mark process that started via automation with the parent PID, so that later I can kill it if parent does not exist.

View 19 Replies

Office Automation :: PPT Automation = Multi-threading And RPC Server Unavailable

Apr 16, 2010

I have successfully automated a PowerPoint Metrics presentation with VB.Net. However, since there were many complicated calculations, it took quite some time to make the 120+ slide presentation - so I recently tried to revamp the application to be multi-threaded.

[Code]...

View 1 Replies

Office Automation :: Word2007 Automation Without Word12 Object Library

Jan 21, 2012

I've got VS2008 and Office2010, but I don't have Office2007. Therefore, I have the Word14 Object Library but not the Word12 Object Library. Will the code that I create for Office2010 automation also work where clients only have Office2007 or will they have to upgrade their office suites?

View 1 Replies

Office Automation :: Excel Automation - Call Rejected

Dec 17, 2010

I have been pulling my hair out trying to fix this.

[Code]....

View 1 Replies

Office Automation :: Excel Automation Causing: Rpc_e_serverfault

Jun 1, 2010

We have a vb program which is run on our server by scheduled task every day. The program opens about 30 excel files, refreshes the data connections, pivot tables and then saves the document in another location.

This may run fine for a couple days but sooner or later the process starts crashing, usually with this error: RPC_E_SERVERFAULT.

My question is, Is it expected that continually opening/closing/refreshing workbooks will inevitably cause the Excel object to crash at some point.

View 3 Replies

Office Automation :: .net Automation Excel App Not Closing

Sep 25, 2009

I'm having an issue where my excel.exe process doesn't close until I close my .net application. I'd like to avoid using Process.Kill() if at all possible.

Code:

Private Sub WriteRowsToXls(ByVal rows As DataRowCollection, ByVal xlsPath As String, ByVal showStatus As Boolean, Optional ByVal AddTotals As Boolean = True)
Dim xlsApp As New Microsoft.Office.Interop.Excel.Application

[CODE]............

This method references a couple of other methods I use for repeated formatting tasks, I'll include those methods below. (I added the FinalReleaseComObject into the other methods after reading Mike's thread but the issue persists)

Code:
Private Sub SetRangeValidation(ByVal rng As Range)
With rng.Validation
.Delete()

[CODE]..............

Method SetRangeAllBorders does about the same as these other methods but my post is too long to add it. The only other things not shown in these code snippets are a few string variable that are defined in the class, studentWS, studentsWSPW, paymentsWS and paymentsWSPW My App creates an instance of the class, loads some data, runs the method above, and then sets the class to nothing. I'm using .NET 3.5 automating Excel 10

View 2 Replies

Office Automation :: Automation Addin Requirements

Aug 13, 2011

I wrote a simple Automation Addin using VB.NET and .NET 4 and want to distribute it's dll to a

computer with xp sp2 and Office 2007 (Excel 2007) without I install .net on that computer, is it

possible?

View 2 Replies

Office Automation :: Automation Of Word2010 With VB2008?

Oct 20, 2011

This might seem a ridiculous question but I just want to make 100% sure before I start committing any funds to software purchases. Can I use VB2008to develop automation routines to control Office2010 applications or must I absolutely use VB2010 to do so?I ask this because I installed an Office 2010 pro on my station which already has VB2008 and I do not have any Word14 reference in the COM section of the list of references...

View 1 Replies

Office Automation :: VBA (XLA) Automation From C#?

Oct 30, 2009

Trying to Automate the VBA code from C#, the existing VBA code is a legacy code which has hundreds of nested calls within.Automate these VBA routines from C# and during the Automation there could be some COM objects which needs to transacted between VBA and C#.COM Objects currently have a Interoperability wrappers to C# and they are being developed in VB and C++?

View 2 Replies

Office Automation :: Automation Excel Without Install Excel

May 28, 2009

I am developing an application using excel automation.The worst thing is the client's side doesn't have excel installed.What is the solution for this case?

View 17 Replies

Office Automation :: Excel Automation - Cannot Use Office PIAs

Feb 14, 2009

It appears that when one creates an instance of Excel, using CreateObject, (Late binding), the suggested Excel closing function (with GC.collect etc) does not work. I have tried several suggestions, and the only one that works is process.kill method. Do you see any problem in using this? BTW: the reason we are using late binding is that we cannot use Office PIAs....not sure which version of Office would be installed on the client site. We work with O2003, but the client might still be at 2000 or 2002.

View 7 Replies

How To Do Multithreading

Jan 18, 2010

What is multithreading and how do i do it in vb.net?

View 2 Replies

Asp.net - Use Of Multithreading In Web Apps

Dec 17, 2011

I am using an Application server for calling Oracle Reports and I have a URL to call the report. When the report is called the server converts it into PDF but when report contains large data it takes a lot of time to load. I want to do in asp.net that when I call the report url it opens the PDF file and copies it into the root of my web folder. The next time when I call the URL it opens the PDF file and creates a new PDF on backend for next call. I have made this function to download file

[Code]....

View 2 Replies

C# - MultiThreading And Deadlock?

Mar 28, 2009

In which situations we can do the multithreading and deadlock concepts. can give some examples

View 4 Replies

Multithreading A For Loop?

Feb 27, 2011

Basically I am making a proxy testing program. A user can supply a list of proxies to test. What i want to be able to do is have them be able to specify how many threads they want to run. Then have the program go through the list testing each one using the amount of threads supplied. Really not sure even where to start on this. Threadpooling?

View 3 Replies

Multithreading And Commons?

Dec 21, 2011

What does common data or data that's in a common, look and is treated by multithreading? I'm quite aware that acess to such data would have to be synchronized, but beyond that is it acessible?

"MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me

View 15 Replies

Multithreading In A Class

Apr 13, 2009

I have a class with a background worker in it that does some tasks on a separate thread. I want to fire some events from the background worker thread to the 'main thread' of the class, so that when using this class your not obliged to go make invoke calls for every event handler your using.I'm at a loss of how to do this though. When having a similar problem in a form of usercontrol I always use Me.Invoke, but this method is not present in a class inheriting system.object.

View 1 Replies

Multithreading With A Timer?

Mar 1, 2011

I have a screen that checks for alerts every 30 seconds by looking up outstanding issues from a database.When there is an alert, an audio file is played depending on the alert.It takes 1-2 seconds to grab this audio file which caused an issue with global screen freezing, so I added multithreading where it plays the sound file. This seemed to work fine.However I am new to multithreading and am not sure if I'm working with it efficiently..I have simply declared the sound-playing function as a thread at the top:[code]I am unsure if starting and aborting the thread is the right way to do it. However if I suspend or make the thread sleep I would have to determine whether it has been run before.

View 18 Replies

Multithreading With Databases?

Aug 22, 2010

I have read many articles on multithreading over the past few days and so far I'm fairly comfortable with how it works. I am now working on my actual application, and have come across a few design issues that I'm hoping somebody has experience with.The basic premise of the application is simple. A database filled with files names and a "converted" field that has a 1 or a 2 in it (1 for unconverted, 2 for converted). The application loops through every record where "converted" = 1, retrieve the file and convert it.

My single threaded application works fine, except its far too slow. Due to the huge amount of rows in the database (4 million+) and the time constraints on the project, I have decided to run as many threads as the hardware can allow to cut down on the timings.So, the dilemma is accessing database records and which threads should grab which record and how.

View 3 Replies

Multithreading With Same Procedures?

Nov 23, 2011

I have a function in my program that adjust sales for multiple days. Sometimes it needs to adjust up to 3 months and the tasks takes a while so I decided to split up the work between multiple threads. The way I have it working is say I need to adjust 3 months. I have the first thread adjust sales for the 1st month, the second thread adjust sales for the 2nd month and finally a third thread that will adjust sales for the 3rd month. Since all three threads are performing the same tasks except for different date range they use the same procedures. Within those procedures I make a call to the database to extract the sales for the given month. At some point it seems like the threads start to use the same SQL Data Objects because I am receiving the below error."There is already an open DataReader associated with this Command which must be closed first."Below is the first procedure that is ran by each thread up to the line where it errors out.

Private Sub Process_Adjustments(ByRef objAdjustBillCodeThreadParameters As clsAdjustBillCodeThreadParameters)
Dim cmd As SqlClient.SqlCommand

[code]....

So all three threads call this subroutine and the first thread does the data fill with no issues and then sometimes even the second thread does the data fill with no issue but then the third thread crashes and produces the above error. It seems as though the threads are sharing the same SQL Objects when all objects are local to the sub and I always thought each thread had it's own memory to work with. So I thought each thread would call the sub create it's own objects in memory, but that does not seem like what it's doing. I have other multithreading processes in my application that work perfectly fine, this is the first time I am attempting to multithread in this manner where I am using the same procedure within multiple threads.

Just thought of something that I might be doing wrong. The subroutine in question is in the same class where the threads are created. Should the subroutine be in it's own class, and therefore each instantiation of that class?

View 3 Replies

Use Multithreading With VB 2005?

Nov 13, 2009

I try to use Multithreading with VB 2005. I added a Listbox to main form and i tried to fill ListBox with 2 threads. When i executed code it told me that this is unsafety operation becasuse of ListBox is created with Main(Form1) form.

Is there anybody who has such simple multithreading example with Mutex or such lock mechanism?

View 1 Replies

VS 2008 - Right Way Of Multithreading ?

Jun 8, 2010

what is the right way of Multithreading in visual studio 2008.

View 1 Replies

VS 2008 MultiThreading In .net?

Aug 10, 2010

I m making a project in which it check website about there status (Online / Offline) through there status code and when project is in processing it hang's until the whole line of code complete

[Code]...

View 5 Replies

VS 2010 Multithreading With WIA

May 11, 2010

I'm using the WIA Aut. Library [URL] , trying to capture photos from 5 digital cameras (Nikon D90) USB-connected to my pc. Now, I partially achieved my goal, what I do is:

- loop through the attached devices, connecting to every camera;

- fotocamera.ExecuteCommand (WIA.CommandID.wiaCommandTakePicture) ;

- other image processing operations...

Everything works fine but... the workflow is camera1 -> connect -> grab pic. => camera 2 -> connect -> grab pic. => camera 3.....

[Code]...

View 1 Replies

Writing Background Multithreading

Jun 30, 2011

My application will creates an Excel from DB, creating an excel file takes few minutes of time and till that time the user dont want to wait for the excel to complete, he should start working with the application. Once the excel have been completed the appilcation should po-up message saying, 'Report Sucess'. can any one tell me how to do this, whtr background thread will help me in this ?

View 1 Replies







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