|
ok i have it.My program is work one time correct and one not ???? when is on other computer why ????
|
|
|
|
|
|
I have one single thing to say : LoL
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
Hello:
i want to write a interrupt in c# but i don't now how can i get address of my function that i want to use it for ISR.
how can i do it?
|
|
|
|
|
In order to achive such things you must juggle with reflection, unmanaged code, marshaling and others ... not a very easy thing in c#
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
C# is most definitely NOT suitable for this. C# doesn't have direct access to the hardware because of Windows Hardware Abstraction Layer. Your best bet for this sort of thing is C++ and the Windows Device Driver Development Kit. You have to write a Ring 0 .DLL that runs behind the HAL and exposes an interface for your C# app to use.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I'm working with vs.net 2003 in C#. I don't know how to create an empty report in cristal reports and then bind a DataSet. My goal is to change a sql statement in runtime. I think the easiest way to do this is by binding the dataset.
I came accross to some tutorials but the code like this does not want to work:
DataSet ds = new DataSet();
dataAdapter.Fill(ds);
Empty_cr report = new Empty_cr();
report.SetDataSource( ds);
crDataViewer.ReportSource = report;
Why? What is the reason?
Maybe someone knows a really good tutorial?
Could anyone help me? Please!! This is very important for me and can simplify some things.
Regards:
Olg
|
|
|
|
|
I've created a windows service to ensure another service is running. First of
all, I look for the process relative to the service I'm monitoring. The code
is:
Process[] processes = Process.GetProcesses();
foreach(Process process in processes)
if(!process.HasExited &&
process.Id > 0 &&
process.ProcessName.ToLower() != "system" &&
process.MainModule.FileName.ToLower() == serviceDetail.ExecutablePath.ToLower())
...
The problem is with the MainModule property, called at the end of the if
statement. Internally, the MainModule property gets all modules for the
process and looks for the main one. So, if the process has exited, the search
for the process modules fails and we get an exception.
In order to solve this issue, I test the HasExited property at first place.
However, I still get an exception: "Cannot process request because the
process (3248) has exited." Why this exception occurs if I have tested the
HasExited property? Am I doing somethig wrong or missing something?
Another exception is thrown too. Sometimes I get an "Access is denied"
exception from this code piece.
Does anyone have any idea that could help me?
Thanks in advance.
Ricardo
|
|
|
|
|
Ricardo Mendes wrote: "Cannot process request because the
process (3248) has exited." Why this exception occurs if I have tested the
HasExited property? Am I doing somethig wrong or missing something?
A process is independent from your code. If a process is now running, in a couple of clock cicles can enter in an different state, in the same time that you do an other operation (let's say adding two numbers). I think you should try to lock your code when you execute it.
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
Hi,
From my normal application running in my computer i need to connect to PDA and send some data or activate a method.
An PDA application (.net based) is already running in the PDA.
what is the best way to do it? will really appreciate
regards,
rnv
|
|
|
|
|
Hi All,
I want to have a nested class which is generally accessible, but can only be instantiated by it's containing class. ie:-
public class Parent
{
public class Child
{
<ParentOnly> Child();
}
public Child GetANewChildObject()
{
return new Child();
}
}
C# doesn't seem to directly support this - the closest you can get is with the internal access modified, which is sub-optimal.
The only real solution i've found is to implement the child class in 2 classes- an abstract Child, and a private Child2 : Child . But that seems a bit clumsy. Is there a better way?
Thanks
Jon
using System.Beer;
|
|
|
|
|
I think the 2nd way you suggested is the most limiting while still being usefull. The internal approuch doesnt really 'block' it. Another option to limit it even more is to make the abstract class protected, or the inheriting class protected for less limitation. You can get quite funky with nested layouts.
xacc.ide-0.1 released! Download and screenshots
|
|
|
|
|
Hi,
I have a Widow service. I am installing the service and related applications using install shield. i have written a service installer class. This works fine when i am installing or Modifying the application using setup file.
It gives problem when i repair the application, since the service is already exist. I have tried to stop installing the service if it exists in the system but still it gives me error "Unsave state...". In service installer class i have override install and uninstall method.
Is there any other way ot handle this.
Please give your suggetions.
Thanks & Regards
Basant
-- modified at 8:13 Tuesday 29th November, 2005
|
|
|
|
|
Hi,
I have a c# windows application with sys tray and a shortcut in desktop. There is no provision for minimizing the application window, so if i close the application i can re-open it from sys tray. Now the problem is that if i click on the shortcut, which is availabe on desktop, the application should open.
I have implement this partially, means i have closed all the process of the application and open a new one. For this i have used GetProcessesByName() function which is not worked in XP & Win 2k. I think it will better if the application already availabe in sys tray will open without killing the process while I clicking on desktop shortcut.
Please give your helpful comments.
Regards,
Basant
-- modified at 8:15 Tuesday 29th November, 2005
|
|
|
|
|
i have seen many about converting string to hex solution but yet to see any solution on converting hex to string.
i have been cracking my brain on converting hex to string. so i am wondering anyone can help me out on this problem.
Thank you
orrjiao
|
|
|
|
|
What do you mean, really? A hexadecimal value is a string representation of a number. A number in itself is not hexadecimal, it's just a number. A numeric base is only relevant when representing a number in string format.
Do you mean that you want to convert a string containing the hexadecimal representation of a number into a number?
---
b { font-weight: normal; }
|
|
|
|
|
i am sorry bout the unclear question i have post up.
yes, i am finding solution on coverting string of hexadecimal to decimal.
so is there any method i could use to slove this problem?
thank you.
orrjiao
|
|
|
|
|
Here is one way to do it:
const string digits = "0123456789ABCDEF";
string hex = "2A";
int num = 0;
for (int i=0; i<hex.length; i++) num = num * 16 + digits.IndexOf(hex[i]);
The code should of course be improved with some error handling, and allowing for lower case characters also.
---
b { font-weight: normal; }
|
|
|
|
|
Image to to Stream of Byte[]?
I have an image in the pictureBox captured from a device .Now i want to convert this PicBox.Image to stream of bytes to save it in the DataBase.Plz help me how to convert this image from pictureBox to stream of bytes.I pretty know how to save it in database but having some problem converting the image to stream of bytes from
PictureBox.
Thnx in Advance!
|
|
|
|
|
Just use the Save method of the Image class.
PicBox.Image.Save(stream, ImageFormat.Jpeg);
---
b { font-weight: normal; }
|
|
|
|
|
hi,
when i change one record or more i want to show changes to DBGrid which
i have opened it before ! can i refresh DBGRID ?
thanks!
|
|
|
|
|
Assuming you are using a DataSet to provide the data to your DataGrid, clear the data set and then fill it again from the data adapter.
|
|
|
|
|
hi,
i want to run an execute file with c# code but
i don't know?
can you help me?
|
|
|
|
|
Hello,
Please have a look at the following code:
Process newProcess = new Process();<br />
ProcessStartInfo info = new ProcessStartInfo("cmd.exe");<br />
newProcess.StartInfo = info;<br />
newProcess.Start();
HTH.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
hello to everybody.
I have problem with installation on my problem on another computer with differen language.My program is made on c# the windows version is xp en but computer on witch i want to install it is xp italian.So how to install it.I do this procedure copy my program and past it in other computer.If this is not correc what to do.
Thank you
|
|
|
|