|
I'd prefer to wrap it in another method that would then be exposed. That's how I do P/Invoke.
public byte[] Whatever ( ... )
{
/* Maybe convert the parameters as necessary */
return ( C++Library.MethodName ( ... ) ) ;
}
|
|
|
|
|
Errr, I think this is managed C++, isn't it? In this case you don't need pointers at all. Both libraries are running under the CLR, so you can pass the byte array. Have you considered AssemblyResolve[^] event?
|
|
|
|
|
Hi,
Any one guide me about the datagridview
Advance Thanks,
GJ.Balaji
|
|
|
|
|
See here[^].
You can search on the internet and you will find tons of more information.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
Be warned, you should not edit data in a list control. Pop a dialog with the record information and edit it there, then reload the table/record in the grid after the user has completed editing.
Inline editing generates more problems that it solves.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Agreed - plus it is a lot easier for the user to work out what goes where. 5!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
I got more than 168000 results when I used this keywords "update and delete data in DataGridview in C#" to search on Google. whatever I will suggest you to move there[^] and read the whole thread. and you can also navigate this link[^] to learn how to delete,Insert and Update data with datagridview.
|
|
|
|
|
That's not how this forum works. Somebody posts a vague question that requires some research. It's up to you to go off, read up on the subject, write a lengthy reply detailing exactly how to accomplish the task and the ins and outs of the topic. Expecting somebody to Google a topic first is just crazy talk.
|
|
|
|
|
thanks for your valuable advice.
|
|
|
|
|
I'm not altogether convinced that your irony got through there.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
|
|
|
|
|
Neither am I. I hope that he's being subtle and not taking it to heart.
|
|
|
|
|
Hi friends,
I am developing a Parental Control application. I want that no body could kill this application from Task-Manager. Even administrator should not be allowed to kill this process from Task-Manager.
The only way to close the application should be that user click its CLOSE button, he will be then asked to enter his password, and if he enters correct password, application would get closed.
The behavior should be similar to when user try to kill an anti-virus. For example when I try to kill the anti-virus Kaspersky, I get below error message:
---------------------------
Unable to Terminate Process
---------------------------
The operation could not be completed.
Access is denied.
I also want similar behavior. Please let me know, how to do that.
Thanks in advance
|
|
|
|
|
If a user has full admin rights they can take down/kill any process.
At Karpersky it is a windows service that must be shut down(stoped) before ending the process(es).
[edit to add]
If the computer(s) are on a domain with active directory then it would be really simple to block even the local admins.
All the best,
Dan
modified on Sunday, January 16, 2011 12:55 PM
|
|
|
|
|
By hooking into TerminateProcess or NtTerminateProcess you can achieve what you're looking for. I seriously doubt though that having a .NET C# function as a hook function is a.) advisable and/or b.) a feasable thing.
If you want to invest some time/work to get going in C++ this CP articel might come in handy: Easy way to set up global API hooks[^]
Regards
|
|
|
|
|
This question comes up regularly in one form or another in this forum. While I appreciate that you have a legitimate reason for wanting to do this, you have to appreciate that we are averse to posting information that will let any old script kiddy create a malware application that can't be terminated. Sorry.
|
|
|
|
|
Well said. Exactly what I was thinking, but you reflect it in a much more polite manner.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
hey guys..i have a chart control and a datagridview on my form..i want to show the values in a graphic which i have in datagridview..Here is how it looks..i have some questions about it.
1) how i can arrange YAxis increase rate as 1..it increases by 5.
2) how i can move the black lines on backround of my chart area?
3) there are two series(Series 1 and Sayilar) there..i couldnt find any example that i can use Series1..i mean the chart control already has..that is why i created new one(Sayilar)..my question is how i can use Series2 or how i can remove it..here is the codes i created and added it to my chart control
4) how i can add some texts of Chart control Axis to inform the user which columns means what
Series series = new Series("Sayilar");
series.Color = Color.DarkGoldenrod;
series.BackSecondaryColor = Color.OrangeRed;
series.BackGradientStyle = GradientStyle.LeftRight;
series.XValueMember = "Sayilar";
series.XValueType = ChartValueType.String;
series.YValueMembers = "Kaç Kere";
series.YValueType = ChartValueType.String;
series.ChartType = SeriesChartType.Column;
chart1.Series.Add(series);
than ks for your helps and answers
vemedya.com
|
|
|
|
|
I've written a small monitoring app in c# that notifies the user of specific events on the pc. The wish I would like to have is for the one and only control (Label) to be static on top of the task bar. Currently I've just got a timer running that places it as the top most window, I'd like to eliminate the timer and just have it pinned sort of to the taskbar (not in the notify area). Any direction you may provide would be helpful.
|
|
|
|
|
There's a CodeProject-article on creating a DeskBand[^] that might be useful
My last[^] article - write your own FileSystem application in .NET
|
|
|
|
|
Hello,
When i wrote a "Source" property as full path "C:\aaa\aaa\aaa\aa\fileName" i do hear the sound, but when i'm trying to set the path using the resources, it doesn't work (no sound), i've marked build actions of the media file as "resources". and in source i wrote /namespace;component/Resources/filename
What i'm doing wrong here ?
thanks
|
|
|
|
|
I used to play sound file from Resource by using something like given code
SoundPlayer sp = new SoundPlayer(global::WindowsApplication1.Properties.Resources.XYZ);
sp.Play();
I will suggest you to navigate this link[^] to learn simple way of playing Sound file which is embedded in resources.
modified on Sunday, January 16, 2011 12:58 AM
|
|
|
|
|
thanks for the answer. but the problem is , i'm using wpf media element, i cant call global::WindowsApplication1.Properties.Resources.XYZ within media element tag, by using Source Property
|
|
|
|
|
igalep132 wrote: i'm using wpf media element
If so then you should mention about WPF in your Question
|
|
|
|
|
I had to write a function that was essentially "given some random object at RUNTIME as 'object o' and some random property as 'string propertyName' at RUNTIME, return property o.[propertyName] as an object."
First thought was naturally reflection.
for (i = 0; i < 1000000; i++)
{
// get property 1 million times through reflection
}
that took 4.4 seconds on my machine. I unwound the loop a bit and got it down to 2.1 seconds.
Then I switched it over to LINQ expression trees and got it down to 93 MILLSECONDS. 4.4 seconds down to 93 MILLSECONDS...
Now, LINQ expression trees are very poorly documented in MSDN and a search on google and CodeProject turns up very little. It did take me about 5 hours to figure them out (on a super basic level).
But why aren't they used more often? 4.4 seconds vs. 93 millseconds sounds like a big deal to me .
|
|
|
|
|
SledgeHammer01 wrote: But why aren't they used more often? 4.4 seconds vs. 93 millseconds sounds like a big deal to me
Primarily because they are poorly understood, and working with them is more complex than most other areas.
|
|
|
|