|
|
I had developed Today screen programming for Pocket
PC using .NETCF,C#,Today screen plug in which is provided by microsoft
.I refered the following link.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/TodayScrn.asp
It is working fine with Pocket PC 2003 English OS.But it is not working with Pocket PC 2003 German OS.What is the change i need to be do to
make this work in German OS.I didnt get any error or crash but my
application is not listed out in Pocket PC (that is in
Settings->Today->Items tab).So i am not able to set the today screen
item and access the application.Please help me in this regard.
Regards,
S.Sevugan.
|
|
|
|
|
how to add module in c#.net? There is no option in the menu project-> add module in c#.net which we have in vb.net.
sarayu
|
|
|
|
|
Use CSC.exe (C# compiler) to compile ur code in to a module using the Target switch. Then use AL.exe (assembly linker) to link the module to ur assembly.
|
|
|
|
|
hi
Thank you for the response.
Iam not aware of how to compile and usage of assembly linker. can u give me the step by step procedure.
Regards,
Sarayu.
|
|
|
|
|
Look in msdn.microsoft.com
|
|
|
|
|
C# does not support the concept of modules as VB.NET does. AFAIK the module concept is a hang over from the old VB6 days and the VB.NET compiler does some fudging when converting the VB.NET code into MSIL in order to get it to work.
I did read an interesting article on the subject a week or two back, however I cannot find it otherwise I would have linked to it.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
I mean CSC /target:module
Never used VB & don't know how a module in VB differs from module in dotNet.
|
|
|
|
|
hi
I have got the information from msdn but that is purely related to console application. How will i do that in windows application using c#.net.
My requirement is :
I need to access a variable globally where the changes are done dynamically and that has to be reflected in all the other forms in that solution file.
example:
A variable a=10 is accessed globally.
During runtime i ll change the variable,a=20 in a different form.
how will this reflect in all the other forms unless i declare the globle variable in a module.
if i declare the variable by giving
public static a
i can access globally, but i cannot do the changes dynamically.
hope i ll get your help.
thanks,
sarayu.
|
|
|
|
|
Hello!
We are using a class to manage serial port, and we are continuously receiving data from GPS.
In order to improve things, all the complex treatment is done by a worker thread, but we need to do many UI updates from this thread. The result is this: all things are right, but UI always slows down and doesnt offer a good response to user interation.
We are using Invoke function for these UI updates, something like this:
protected TextBox _txtSum;
protected int _sum ;
public void thread_funcion()
{
_sum = ......... // complex process
_txtSum.Invoke(new EventHandler(UpdateSumDisplay));
..
..
..Many more complex UI updates
..
}
public void UpdateSumDisplay(object sender, EventArgs e)
{
_txtSum.Text = _sum.ToString();
}
... but I think this is not enough (and we discovered Invoke is a blocking method!!!)
How do you guys solve this kind of situations?
Any idea will be useful!!
Thanks!!!
By the way, my app is developed using Compact Framework on a Pocket PC, thats why we are in great need of perfomance.
|
|
|
|
|
_Silius_ wrote: and we discovered Invoke is a blocking method!!!
You could try BeginInvoke , i don't know if it's in the Compact Framework though...
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Im afraid BeginInvoke is not avaliable in CF
|
|
|
|
|
Hello everybody,
I have created a setup project with Visual Studio .NET, everything's all right but during installation, I cannot see the files which are installed ...
Does somebody knows how to make appear the files installed during installation ???
Thanks a lot and have a nice day,
alain
There is no way to happiness, happiness is the way !
|
|
|
|
|
This is not a cappability that is supported by Windows Installer. To actually display each file name as it is copied requires a lot of really complex custom modifications to the setup.
You can add a line to the MSI using Orca to get the progress bar to display some simple messages like "Copying files", "Creating Registry Entries" and stuff like that, but it will not display the file names themnselves.
If you want to add at least some status messages, open the msi with Orca, find the EventMapping table and add a new row with the following values:
Dialog: ProgressForm
Control: ProgressLabel
Event: ActionText
Attribute: Text
|
|
|
|
|
Thanks for your answer ! I'll have a look on what I can do with Orca !
I wish you a nice day,
alain costanza
There is no way to happiness, happiness is the way !
|
|
|
|
|
Hi All,
I've been working on a saved dynamic assembly that holds all the types and corresponding xml serialization attributes I need to deserialize xml documents into objects.
You might wonder why I would choose a dynamic assembly over simply coding the types at compile time - the simple answer is I don't know what the types will be before hand and I only have an xml schema (from which I build the dynamic assembly) with various attributes that change frequently.
Since the schema only defines data types (methods,events,delegates could probably be defined within xs:appinfo tags but in my case they are not), I needed a way to add functionality to these dynamically created classes which were otherwise, nothing more than just data stubs.
The method I chose was to define (at compile-time) abstract base classes from which classes in my dynamic assembly could inherit. Now these simple data-stub classes had a complement of methods to enable them to do more than simply hold data in fields.
Unfortunately, it seems that since my dynamic classes now inherit from classes defined at compile-time, the xml serializer gets confused (see error and stack trace below).
It worked fine before I added the inheritance - maybe I need a reference (somehow) to the hardcoded assembly containing the types I inherit from in my dynamic assembly.
Any suggestions? Thanks in advance, Rein
[[error and stack trace]]
"An unhandled exception of type 'SystemIO.FileNotFoundException' occurred in mscorlib.dll.
Addtional Information: File or assembly name [xxxxx.dll], or one of it's dependencies, was not found."
stack trace:
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlTypeMapping xmlTypeMapping)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)
|
|
|
|
|
|
Hello,
I did the below experiment and I did not understand the cause for the exception. Can you please throw some light on this problem?
Also can you please clarify whether a native client can directly sink the .NET Remoting callbacks?
Description of Prototype:
This has mainly 3 modules viz. Remoting Server(C#), Adapter (MC++) and Client(Native C++).
(1) I implemented a SAO(Server Activated Object) singleton, in a C# .NET Remoting Server. Remoting object exposes ISrv interface. Also, Remoting object sends notifications via ISrc interface. These interfaces are defined in a C# Class library and shared across Client, Adapter and Server.
(2) I implemented an MC++ Adapter, a wrapper for the SAO. Adapter implements ISrv interface and exposes the same to native client(s). This basically holds a transparent proxy to the remoting object mentioned in (1).
(3) I implemented a native C++ client interacting with SAO via MC++ Adapter. Client was able to reach SAO via MC++ adapter using ISrv interface. Also Native client was able to receive notifications from C# SAO via sink class(on Cleint side). Actually the sink objects were registered onto SAO by clients via ISrv. SAO Singleton maintains such registered sink objects in an arraylist in its class scope. For some reason, I observed an exception when Server tries to send notifications, 5 minutes(approximately) after the sink object registration. I could not understand the reason for this problem. Can you please clarify? Below is the exception info:
Exception Message: "Requested service not found"
Exception Source: System.Runtime.Remoting.RemotingException
To get around this problem, I had to do the below changes to Adapter & Client modules:
I created a Sink class, derived from MBR and implementing ISrc in MC++ Adapter. Set the lifetime of Sink class to indefinite life time. Then Adapter was able to receive notifications from SAO without any problems as described above. In this experiment, I had to use a different interface between native client and Adapter for Adapter to relay SAO notifications back to the client.
Thank you in advance....
Best Regards,
|
|
|
|
|
chervu wrote: Exception Message: "Requested service not found"
Exception Source: System.Runtime.Remoting.RemotingException
To get around this problem, I had to do the below changes to Adapter & Client modules:
That happened because in .NET Remoting, each remote object has a definite lifetime associated with it. This is to avoid leaving them hanging around forever.
Now because you overrode InitializeLifetimeServices and returned null, the remoting framework doesn't disconnect the object from the framework, in other words, the object will be accessible for the lifetime of the server. For more advanced lifetime control, have a look at the ISponsor[^] interface.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thank you very much for the response.
Is it correct to say that native clients(in above experiment: C++ exe) can not directly receive notifications from a Remoting Server (in above experiment: SAO)?
If this is correct to say, then always a managed Adapter(wrapper) needs to be written to receive notifications from a remoting server so as to relay them to native clients?
I did not understand how Remoting Server can lose instances of Sink objects created/existing in the Native exe over heap. Can you please give a pointer on this topic to any book/MSDN article that explains a little detailed?
Thanks again & Best Regards,
|
|
|
|
|
chervu wrote: Is it correct to say that native clients(in above experiment: C++ exe) can not directly receive notifications from a Remoting Server (in above experiment: SAO)?
Yes, because remoting only works across clients written in .NET.
chervu wrote: I did not understand how Remoting Server can lose instances of Sink objects created/existing in the Native exe over heap. Can you please give a pointer on this topic to any book/MSDN article that explains a little detailed?
Your remoting server didn't lose instances of native objects, it destroyed your managed wrappers because their lifetime expired.
This[^] might help. The "Advanced .NET Remoting" book by Ingo Rammer might also help.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello,
I'm facing an interesting problem. I'm developping a .NET C++ DLL which mainly exposes a __gc class that the user can instantiate in its application. He can create many instances if he likes to.
I would like to refresh every instances of the class when this DLL gets a message queued by a C driver.
I would also like that any instance of the class that is no more used by the user is GC'ed.
The problem is that listening to the C driver messages prevents the garbage collector to remove the unused classes.
I tried to use delegates, static events, WIN32 events.
I think that I could succeed if I reference the instances of the classes in an unmanaged code, which will be in charge of listening to the messages. Is it the right way?
Jean-Luc
|
|
|
|
|
|
I am writing a C# app which accesses the list of processes using Process.GetProcesses(). However I was very puzzled when I studied the Process class to discover that it has no method or property pertaining to the user that is running the process. Surely, under XP at least, all processes must have an associated user. Certainly Task Manager lists the user with each processes. Can anyone tell me how, having got the Process object, I then find out which user it is running under?
Dave
|
|
|
|
|
If you know the Win32 API function to retrieve that information, you can always P/Invoke it and pass theHandle[^] property as the HANDLE parameter.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|