15,897,226 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by vidya_01 (Top 8 by date)
vidya_01
19-Jan-11 5:47am
View
I went thru that. I have implemented the following similar code in my application:
private void SystemEvents_PowerModeChanged(object sender, Microsoft.Win32.PowerModeChangedEventArgs e)
{
//The system is going into or resuming from standby
if (e.Mode == Microsoft.Win32.PowerModes.Suspend)
{
mLog.Info("System is going into standby, FST must shutdown");
clsMessageBroker.Shutdown();
}
else if (e.Mode == Microsoft.Win32.PowerModes.Resume)
{
mLog.Info("System is resuming from standby");
}
But this is not helping. I doubt the autodetect has got to do soemthing with the problem. It has a lot of handlers called thru the wndprc method, but i'm not sure how they r getting closed or which of htem is throwing the exception which is leading to the crash.
vidya_01
19-Jan-11 4:41am
View
Thanks so much! The application in the below link works great! but I'm looking for a similar one in C#. Or do you any work around ?
vidya_01
18-Jan-11 23:17pm
View
Hi Espen, thanks for the input. The VISTA system has .net f/w 3.5 sp1 installed.
However I found out that the method asdataview is supported in VISTA sp1 or later.
I want to know if there is a work around for VISTA with versions previous to SP1.
vidya_01
18-Jan-11 0:51am
View
EnumerableRowCollection<devicevariablesdataset.devicevariablelistrow> query =
from rows in mVariableList.AsEnumerable()
where rows.Monitored == true
orderby rows.VariableName
select rows;
mSelectedVariablesLock.EnterWriteLock();
try
{
mSelectedVariables = query.AsDataView();// throwing exception
}
finally
{
mSelectedVariablesLock.ExitWriteLock();
}
vidya_01
18-Jan-11 0:51am
View
this is the codepiece
EnumerableRowCollection<devicevariablesdataset.devicevariablelistrow> query =
from rows in mVariableList.AsEnumerable()
where rows.Monitored == true
orderby rows.VariableName
select rows;
mSelectedVariablesLock.EnterWriteLock();
try
{
mSelectedVariables = query.AsDataView();// throwing exception
}
finally
{
mSelectedVariablesLock.ExitWriteLock();
}
vidya_01
18-Jan-11 0:50am
View
Please find the error details as below : System.TypeLoadException was unhandled Method 'FindByKey' on type 'System.Data.LinqDataView' from assembly 'System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is overriding a method that is not visible from that assembly. at System.Data.DataTableExtensions.AsDataView[T](EnumerableRowCollection`1 source) at IRst_VariableSelectorUIExtension.frmVariableSelector.BeginLoadDataMap(String fileName) in D:\Service Tool_SCM\Source_latest\IRst_VariableSelectorUIExtension\frmVariableSelector.cs:line 920 at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) Many Thanks, Vidya
vidya_01
18-Jan-11 0:28am
View
EnumerableRowCollection<devicevariablesdataset.devicevariablelistrow> query =
from rows in mVariableList.AsEnumerable()
where rows.Monitored == true
orderby rows.VariableName
select rows;
mSelectedVariablesLock.EnterWriteLock();
try
{
mSelectedVariables = query.AsDataView(); // this line throws exception
}
finally
{
mSelectedVariablesLock.ExitWriteLock();
}
vidya_01
18-Jan-11 0:19am
View
Please find the error details as below :
System.TypeLoadException was unhandled
Method 'FindByKey' on type 'System.Data.LinqDataView' from assembly 'System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is overriding a method that is not visible from that assembly.
at System.Data.DataTableExtensions.AsDataView[T](EnumerableRowCollection`1 source)
at IRst_VariableSelectorUIExtension.frmVariableSelector.BeginLoadDataMap(String fileName) in D:\Service Tool_SCM\Source_latest\IRst_VariableSelectorUIExtension\frmVariableSelector.cs:line 920
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Many Thanks,
Vidya
Show More