|
|
This is the second question today about something that can easily be found in the documentation or on the web (search for "c# format binary string" and "c# copy part of array" to get the solutions as the first hit). You really should learn how to use google and MSDN Library, and save your forum posts until you need them.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
System.Buffer.BlockCopy()
|
|
|
|
|
In my application I have hooked the keyboard.Global hooked and in one function im getting a error saying..
“Attempted to read or write protected memory. This is often an indication that other memory is corrupt.”
It comes from this code statement,
return CallNextHookEx(hookID, nCode, wParam, ref lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode,
IntPtr wParam, ref KBDLLHOOKSTRUCT lParam);
This cause to carshed my application. And Can U explain to overcome this issue.
|
|
|
|
|
ASysSolvers wrote: This cause to carshed my application. And Can U explain to overcome this issue.
Yes, you are having a buffer overflow/overrun in your unmanaged code.
|
|
|
|
|
Yes it is true. I have a grabber control to play TV stream. it a .ocx control.
Can U explain how we design a apllication for that kind of issues..
Thankz
|
|
|
|
|
ASysSolvers wrote: Can U explain how we design a apllication for that kind of issues..
Attach an unmanaged debugger and look for the error. Your structs that you pass to the unmanaged function is probably incorrect/too small/misaligned etc. I cant help you on that.
|
|
|
|
|
hi,
I will generate HTML file at Run Time based on setting that end user entered ,
how to add refrence to css file at run time I using webBrowser control.
Thanks.
Wafy
|
|
|
|
|
Use the DOM exposed by the control. You will have to lookup where you need to change that yourself. It is beyond the scope of C#. Try the web forum.
|
|
|
|
|
In my application I have restricted to the 2nd instant of application giving below code,
s_Mutex = new Mutex(true, "MyApp");
if (s_Mutex.WaitOne(0, false))
{
Application.Run(new frmSocket());
}
else
{
MessageBox.Show("Another instance is running");
}
Also im using a Logoff button in my application and and have used below code,
System.Windows.Forms.Application.Exit(); System.Diagnostics.Process.Start(System.Windows.Forms.Application.ExecutablePath);
Problem when I press log off button it cause to 2nd instant ans show the message ("Another instance is running")
I want to run appication again beeing restricting 2nd instant.
How ovecome that issue.
|
|
|
|
|
|
Thankz Lot...
i used,
s_Mutex.Close() after Application.Run(.... statement
Grate!!
|
|
|
|
|
Hi all,
im fairly new at c#...im trying to bind data from sql to a label in my datagrid using the labels databindings...wen i add my code:
Text='<%# Databinder.eval(Container.DataItem,"Date") %>'
the app breaks and says: The name 'Databinder' does not exist in the current context...
How do i correct the code to perform this action?
living life on the flip side
|
|
|
|
|
Hi,
If you want to learn how to connect to a database from c#, why don´t you watch microsoft Absolute beginners Lessons videos (by Bob Tubor).
Download the SQL Server and C# lessons.
It´s free to download.
|
|
|
|
|
hi,
Iam working on windows application (website builder) iam working on webBrowser control ,
I want to add css file(cascading style sheet)for the Html page ,
I Want to make a refrence to css file at run time Please Help me how to do it.
Wafy
|
|
|
|
|
|
stancrm wrote: you cannot add CSS to internet explorer.
You can. The fact that you do not know how, does not make this impossible.
|
|
|
|
|
Hi,
you can get and set the WebBrowser.DocumentText property, hence modify the page any way you like.
you probably will be interested in the Navigating, Navigated and DocumentCompleted events.
|
|
|
|
|
Hi,
My application can now check for all the installed windows service on the local machine.
How can I do this for other machines on the network?
For example, from my machine where the application starts, I would also like to check for the windows service names on OTHER machines.
Please note that I do know how to loop through the names of the windows services but not sure how to connect to other machines to do this.
Thanks
|
|
|
|
|
The System.ServiceProcess.ServiceController.GetServices function is overloaded. Pass the computer name as one of the arguments
|
|
|
|
|
|
add reference : System.ServiceProcess
then call :
ServiceController[] sc = ServiceController.GetServices("MACHINE2");
|
|
|
|
|
I want to learn c# completely.
can anybody suggest me good website for c#?
|
|
|
|
|