|
Hi All,
Thank you in advance for reading this, I appreciate your time.
I got a .Net 3.5 application running perfectly on Win7 - 64 and 32 bit.
Also works fine on win XP - 32bit , Didn't try it on XP 64 platform though.
The problem starts on Vista machines.
At first it didnt open at all - DEP error.
I disabled DEP (Post-build event for both obj folder app.exe and bin/Release app.exe)
Checking the .msi deploy (It has to be a deploy eventually - being a commercial product),
on Vista behaved bit better this time but was froze again after a while.
Trying to add the App.exe (after disabled DEP) to the exception list of Vista DEP raised the following:
"This program must run with Data Execution Protection (DEP) enabled.
You cannot turn off DEP for this program."
??
Needless to say I am bit stuck here.
This is for commercial use and I need it to be compatible for all platforms.
A few words of what is included in my project, that I can share:
a. Video runs from start - I use wmp control (ActiveX control).
b. got a keyboard mapped by the InputSimulator.dll[^]
c. got a code using user32.dll to hook some keyboard combinations
I am working on win7-64bit visual studio 2010 C#, FW3.5
My questions:
a. How do I know DEP is really disabled?
- any way to check the .exe for that DEP disabled on my platform?
b. Do you think wmp is causing this or the other .dll's?
Any Suggestions would be appreciated
Thank you again for reading,
Shabi
modified on Tuesday, September 20, 2011 1:25 PM
|
|
|
|
|
If you have to disable DEP to make your app run, you need to re-evaluate the way your app is written. You have much bigger problems.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Turns out it runs perfectly on other Vista machines..
Bad luck on that specific machine I have tested.
Thanks for the reply though,
Shabi
|
|
|
|
|
In Windows Task Manager, open the processes tab. In the view menu, go to select columns. Select "data execution protection".
Have you checked that the remaining problems are not actually caused by UAC?
|
|
|
|
|
Greetings gurus,
I would appreciate your input on whether this idea is even workable before getting to complicated.
The goal:-
Retrieve performance data from remote PC A on Domain A into a SQL database on PC B on Domain B via a running service on PC A.
The method:-
Create a program in C# or C++ which retrieves CPU usage, Available RAM, disk usage and uploads the metrics to a SQL database. This program will run on a target PC as a service/agent.
Note:-
I have already created something similar in vba which runs under MS Access in the LAN but I would like to extend this concept.
I have tried getting Windows Performance Monitor (perfmon) to upload to a remote SQL db but have found that perfmon can't pass on the SQL login (i.e. the connection tests ok but writing to the table fails)
So:-
I have found this Simple Windows Service Sample[^] and used it to create a service. Could someone please point me in the right direction where I can learn (by example) how to read the above metrics?
I have tried to understand some examples of reading hkey_performance_data without getting the code right and I would prefer not to use WMI queries as they seem to slow the host machine down while querying the WMI base.
Any suggestions please.
Many thanks.
|
|
|
|
|
I suggest a WebService running on PC B and the Windows Service on PC A can access it to store its data.
|
|
|
|
|
Hi PIEBALDconsult and thanks for the quick reply.
Why would you want to put middleware between the agent and the SQL backend (if that's what you mean). Surely writing straight to SQL would be more efficient?
|
|
|
|
|
Because every time I write an app that directly connects to a database I have to rewrite it to use a Web Service.
There are all sorts of good reasons to use a Web Service, but I don't feel like trying to think about it right now.
CCodeNewbie wrote: more efficient
There are more important issues at hand.
|
|
|
|
|
Hi ,
I am writing a code to get the assembly version of an exe exists at C:\program files\xyz\xyz.exe.
private void button1_Click(object sender, EventArgs e)
{
try
{
MessageBox.Show(FileVersionInfo.GetVersionInfo(@"C:\Program Files\XYZ Software\XYZ Enterprise 1\Client\XYZ .WinForms.App.exe").ProductVersion.ToString());
}
catch(Exception ex)
{
MessageBox.Show(ex.Message +"--" + ex.StackTrace);
}
}
Its showing correctly when executed in my system like 7.1.0.22 . But the same code executing at Server 2008 its not working fine. its raising exception. May I know how to get version .
Thanks
|
|
|
|
|
Maybe read what the exception says, and adapt your code accordingly.
|
|
|
|
|
My guess is that your application is running into permission issues. You need to read up about the new security model introduced with Windows Vista and above, and see what effect that has on your code.
|
|
|
|
|
That exe is in "Program Files (x86)" on a 64bit server, isn't it?
Yes - No - Cancel - FileNotFound ...
|
|
|
|
|
I've got 2 tables (Components, Servers) with a many-to-many relationship and hence a 3rd table (ComponentServers) connecting the two main tables.
I've created a DataSet and bound WinForm to show and edit this data, but I can't get it to work if there's no data already there. i.e. UPDATE works but INSERT doesn't. I've checked the SQL and that *looks* ok.
The insert is:
INSERT INTO ComponentsServers (ComponentID, ServerID, Environment)
VALUES (@ComponentID,@ServerID,@Environment)
The update is:
UPDATE ComponentsServers
SET ComponentID = @ComponentID, ServerID = @ServerID, Environment = @Environment
WHERE(ComponentID = @Original_ComponentID) AND (ServerID = @Original_ServerID) AND (Environment = @Original_Environment)
On the form I've done the binding via controls not code, and the ComponentServers BindingSource does reference the related ComponentServers table in the DataSet and not the standalone one.
In the save button I've got:
this.Validate();
this.componentsServersBindingSource.EndEdit();
this.componentsBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.eSSDBDataSet);
The form works from a presentation point a few, and as I said, if I update a exisiting entry. But if there's no row in ComponentServers I can't get it to work.
Any clues as to where I've got it wrong? I *think* its the DataSet, but not sure why!
|
|
|
|
|
while Remote Oracle Database connection, mentioned exception coming
ORA-12154: TNS:could not resolve the connect identifier specified
I installed for client side OracleXEClient software for accessing. How can i solve these problem?
--Thanks
|
|
|
|
|
There looks to be some issue with 'tnsnames.ora' or Oracle install directory (ORACLE_HOME).
also look at this link[^], if it makes sense.
// ♫ 99 little bugs in the code,
// 99 bugs in the code
// We fix a bug, compile it again
// 101 little bugs in the code ♫
|
|
|
|
|
|
Hello all,
I am very new to Visual Studio and C#, and have just now decided to try it out, after years of "casual" development using Delphi.
I have a simple question that I just can't find an answer to; Namely, how to install additional classes, for example downloaded from here.
The class I'm trying to install is this one;
XML configuration files made simple... at last![^]
The zip-file contains a dll-file and a few xml-files. I would really appreciate some help about where to put these files, as it is totally different from installing components in Delphi.
I am using Visual C# Express 2010.
Thanks very much in advance!
Daniel, Sweden
modified on Monday, September 19, 2011 3:08 PM
|
|
|
|
|
(Btw, I'm a bit surprised by the fact that there is no simple "wrapper" for saving/reading data from xml-files, something like TIniFile in Delphi. I've experimented a bit with "Applications settings" which seems really great, but I would like to have mote control of how the xml-file looks, where it is placed, etc.)
Please don't let this rant overshadow my original question.
Thanks again!
Daniel
|
|
|
|
|
DanielCrk wrote: I'm a bit surprised by the fact that there is no simple "wrapper" for saving/reading data from xml-files
You should be, as your gut is right - the wrapper is called XmlSerializer[^]. Simply wrap it in a method and use it to go from object->XML and back. Also works on collections
DanielCrk wrote: something like TIniFile in Delphi
Prefer XML, as it has better support for handling data and validation.
DanielCrk wrote: I would like to have mote control of how the xml-file looks, where it is placed
Serialize to a MemoryStream, not to a FileStream; you'll be able to manipulate it all you like, before saving the string to a file.
Bastard Programmer from Hell
|
|
|
|
|
Thanks Eddy, I'll definitely check that out. I finally figured out how to include and use "external" classes (alot thanks to jschell) and tried out the one I referred to in my original post, and it seems to be working exactly how I was hoping. So I'll compare the two and see what fits me the best.
I really appreciate your input, and it looks I'll be visiting this forum again! =)
/Daniel
|
|
|
|
|
DanielCrk wrote: Thanks
You're welcome
DanielCrk wrote: it looks I'll be visiting this forum again! =)
Yeah, me too
Bastard Programmer from Hell
|
|
|
|
|
In visual studio you would be working in a solution.
A solution can have one or more projects in it.
A project, in the Explorer view (think that is what is called) each project has 'References' under it.
You can add a dll to 'References.'
As for the xml files there could be many places to put them. But you could
1. Put them in the root where your .cs files are.
2. Add them to the project via right click and add existing.
3. Right click each xml file, select properties and then under 'Copy to Output...' make a selection.
|
|
|
|
|
Got it working, thanks alot!
/Daniel
|
|
|
|
|
I have a C#.net 2008 desktop application that uses some third party software. Since the third party software venfor went out of, I can not ask them any questions about their code. Due to this fact, I have the following questions:
1. I know these third party components had to of been added as a reference. However, can you tell me if there is a way to tell how these third party components were added to the application? For example, could these components have been added as COM, .net components, and/or browse to a location?
2. If I want to remove any of these third party components from this visual studio 2008 C# desktop application, can you tell me how I wouldremove these items?
|
|
|
|
|
1. It's not very easy to see how they were added, but if you check the properties of the Reference entries within your project then that should give some information about their location.
2. You need to decide first what will happen in your application if you remove them; will it still run or crash?
|
|
|
|
|
C# references additional items:
1. I looked at the properties for each third party component and found all 6 items are file type 'assembly'. Is there any way for me to tell if they were an added reference to the solution as a '.net', COM, proejct, or browse items?
2. If there any way to tell if these third party items are required or not? The only thing I can think to do is just remove one item at a time and see if the application still is running.
|
|
|
|