|
Hey,
I got it
DataTable dt = System.Data.Common.DbProviderFactories.GetFactoryClasses();
Thank you.
Regards
|
|
|
|
|
Thanks Aragon
self confidence+hard work=SUCCESS
|
|
|
|
|
MS Lee wrote: Thanks Aragon Smile
You are welcome
Regards
|
|
|
|
|
An eventing service (Project server event handler) is running on windows 2003 server. This service is running under the user "Network Service". This eventing service triggers event handlers against certain events performed on Microsoft Project. The problem occurs when my event handler tries launching an application under the user different than "Network Service". Following is the source code using which i try launching console application under the user which is a domain admin.
public override void onpublish(PSContextInfo ps, ProjectPostPublishEventArgs e)
{
SecureString ssPwd = new SecureString();
foreach ( char c in "password" )
ssPwd.Append(c);
Process myProcess = new Process();
myProcess.StartInfo.FileName = @"C:\test\test\bin\release\test.exe";
myProcess.StartInfo.Domain = "myDomain";
myProcess.StartInfo.User = "domainAdmin"; // domain administrator
myProcess.StartInfo.Password = ssPwd;
myProcess.StartInfo.UseShellExecute = false;
myProcess.Start();
}
Fails in launching executable stating "The Application failed to initialize properly(0xc0000142). Click on OK to terminate the application"
If I comment out the source lines, those specifying the username,domain and password, the executable is launched successfully, but under the user "Network Service". (Like i mentioned earlier the project server's eventing service is running under "Network Service" user) But that doesn't fulfill my requirement. It seems the windows service running under the lower credentials cannot launch the process with higher credentials. I've searched a lot with the problem with no result yet .
Any one please help into this ....
fulbright
|
|
|
|
|
Dear All
Regards!
I am going to develop a basic 3D Drawing Editor. help needed while writing a class for a 3D CANVAS.
Regards
David
david
|
|
|
|
|
Use DirectX for this.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi guys.
How can we access to a textbox in other programs ?
For example , I wanna access to a textbox in Firefox and change the content of it.
Is it possible with API and C#?
Is there a sample of it ?
Thank you
|
|
|
|
|
Do you even know what API means ?
Yes, if you can get the window handle of the textbox, you can interact with it. You'll essentially be using C++ tho, even if you do it via p/invoke.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: Do you even know what API means ?
Well, it is a way for relate C# and windows functions . Isn't it ?
|
|
|
|
|
Mohammad Dayyan wrote: Well, it is a way for relate C# and windows functions . Isn't it
Ya. That is P-Invoke. Check this[^] to see if somebody has already done what you are looking for.
|
|
|
|
|
I haven't tried, but if you have the other program's handle, SendMessage[^] function can be used.
|
|
|
|
|
I use a PrintDialog to set up printer and page setting. I select 'PDFCreator' as printer, and then open 'property'->'Advance' page to select paper size. The wierd thing is, if I select standard paper size('A4', 'A2' .etc), the paper size setting can be remembered correctly next time I show the PrintDialog; but if I choose 'Postscript custom page size' and input custom paper size, this paper setting can not remembered. The next time I show the PrintDialog, the paper size setting is changed to 'A4'. I wonder if any one knows what's the problem. Thanks.
|
|
|
|
|
Hi all!
I'm trying to create a program that automates some web activity. The form has a few input controls and a WebBrowser control. When the automation is run I would like the WebBrowser control to show what the automation is doing. However, when I try and create a second thread to do the work (using the WebBrowser control on the main form) I receive errors for unsafe threading. Okay, no problem. When I create the WebBrowser control within my second thread, I receive an exception because the WebBrowser control needs to be attached to a form. When I try and attach the WebBrowser control that was created in my second thread to my main form, I again receive unsafe threading errors...
I have searched all over for an example that uses threading and a WebBrowser control, with no luck. Can someone point me in the right direction or give a hit as to how I can make this work (while still only having one form)?
Thank you!
|
|
|
|
|
Hi,
All Controls, including WebBrowser, need to be handled by a single thread; the thread that creates a Control is the only one allowed to call its methods and properties; since all Controls somehow are interconnected in a normal app, they all belong to the main or GUI thread.
Other threads wanting access need to use Control.InvokeRequired and Control.Invoke;
look them up on CP or google for details.
|
|
|
|
|
Adding to what Luc said,
Anticast wrote: When I create the WebBrowser control within my second thread
Let the control be on the main thread. Your worker thread can tell main thread to update the control when required. See this[^] article which explains about Invoke/BeginInvoke to avoid cross thread communication errors.
If you are using .NET 2.0 or above, you have one more choice which is SynchronizationContext[^] class.
modified on Tuesday, December 23, 2008 11:12 PM
|
|
|
|
|
Thank you both! The way you two explained it made me realize "what I was missing."
In case this will help anyone else, I got my multithreading web automation to work by creating a new Form inside my void Run(); method, then attaching a new WebBrowser to it, and using that WebBrowser to perform my automatioins.
_WBForm = new Form();
_WBForm.Size = new System.Drawing.Size(410, 310);
_WBForm.Visible = false;
_WBForm.Resize += new EventHandler(_WBForm_Resize);
_WB = new WebBrowser();
_WBForm.Controls.Add(_WB);
_WB.Location = new System.Drawing.Point(5, 5);
_WB.Size = new System.Drawing.Size(400, 300);
While this didn't allow me to view the WebBrowser on my main form, it does allow me to actually multithread my search requests by having multiple webbrowser objects. I added a property to allow me to view what the thread was doing if I wanted to:
public bool ShowBrowser
{
get
{
if(_WBForm != null && _WBForm.Visible)
return true;
else
return false;
}
set
{
if (_WBForm != null)
{
if(value)
_WBForm.Show();
else
_WBForm.Hide();
}
}
}
Thanks again all!
|
|
|
|
|
Hi,
Does anyone know the best place to locate programmers who want to sell their apps or programs? Is there any place on the web where programmers post their creations for sale?
Thanks for any input as I am looking to purchase any apps or programs that are useful and operate in Windows.
|
|
|
|
|
|
kevindill wrote: that are useful and operate in Windows.
A very broad request.
only two letters away from being an asset
|
|
|
|
|
There's a number of sites like download.com that let people download shareware.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Check out rentacoder.com
I do some freelance work there and its a work-for-hire type site, so if you need something made, post your request and a price range and see what people offer.
|
|
|
|
|
You must be in the third world. I don't think that's what he was asking.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello,
I have an assignment for my Algorithm Design course and I can't seem to find where to start.
The problem is some sort of pathfinding algorithm but with a dice, and I must compute the minimum cost/path
I've done other pathfinding problems with A*, Lee, but in this one that dice can go through the same spot multiple times and I can't figure out a condition for this.
Here's a PDF with my problem
http://adcfils.files.wordpress.com/2008/12/cube.pdf[^]
|
|
|
|
|
xnastyx wrote: I can't seem to find where to start
Just a strange thought, but maybe you could ask your professor
only two letters away from being an asset
|
|
|
|
|
That won't work, the professor does not know, he has been asking the same problem for
many years now, hoping to finally get a solution.
|
|
|
|