|
Hi :
I Want To receive A Raw Packets from My Modem
Then I want to Modify The Content Of The Packet And resend it through my modem using C#.Net
Thanks
B.A
|
|
|
|
|
Hi,
My Solution has 3 Projects placed in 3 directories. 2 projects generate DLLs, 1 project generates the final application using the DLLs (at load-time). When I start debugging, I would like the EXE to always find the last compiled DLLs.
For this I see two ways:
- copy the DLLs after each (re)compilation into the EXE directory.
- include the DLL directories into the PATH environnement variable just before Debugging
I did managed NEITHER NOR, from inside Visual Studio. Can someone HELP me?
Thank you very much,
Jerome
|
|
|
|
|
I need the flow of Microsoft speech server in .NET ,How the web controls are embeded with the the SALT and how the text is retrieved from voice if the frequency varies from user to user for the same context.Please reply to this to my personnal id anand.asv@gmail.com
thankyou....
regards,
Anand
|
|
|
|
|
Hello all...
I have created a simple windows service that monitors some folders using a FileSystemWatcher and moves any files saved to these folders. I have built a windows forms application that displays the status of the service and allows the user to stop and start the service. What I would like to do is have this application respond to events raised by the libraries used in the windows service, so I could display status and error messages. I am not exactly sure what would be the appropriate method to implement this. From what I can find, it looks like perhaps I should use .net remoting to communicate between the service and the client.
Can anyone help point me in the right direction?
Thanks in advance for your help!
Oblio Joe
|
|
|
|
|
Add a tab control to a resizable form, set the tab control docking to full... resizing the form causes the tab control and controls in it to flicker like crazy. Seems to happen at least when using C# or C++.
Is there any way to stop this problem? Thanks.
|
|
|
|
|
Is there any available design patterns that allow you to add data to hash tables in a transactional manner? (ie: roll back the addition in the event that adding data to one should fail)?
I am building a prototype class for a project I am working on that needs to store some data and I am trying it out two ways to see how it works.
One way is to use an in memory dataset with a few columns to store the data, the other on using a few hash tables to store each column along with its key.
Since the addition to the hash tables will require multiple hashtabel_name.Add() function calls I am thinking that there is the remote possibility that one add might fail for some reason. I would love to be able to roll back the other additions that have been made up to the point where I error out. Barring the use of a try/catch block around each .Add() and then the correct .Remove() calls for each of the previous hash tables, is there any 'known and tested' way of doing this?
Am I wasting my time here? Would it just be simpler to use a dataset for this and do my CRUD with SQL queries when I need to? I want to keep this as lean as needed. The data will not need to be persisted to any physical devices (ie: saved to disk) and is only used in the context of the class.
The big reason I am considering the hash table route is that one of the 'columns' needs to store a reference to another class and I am not sure if I could accomplish what I am trying to do with a dataset.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Hi, I have to convert a VB.NET application to C#. In the VB code, the expession CInt(True) is used. I read that CInt(True) was equal to -1 while Convert.ToInt32(True) was equal to 1.
Now I'd like to convert CInt(True) to C#... how can I do it? I can't use an explicit cast since we can't convert a bool to an int, and I can't use Convert.ToInt32() ... what can I do???
Thanks!!!
|
|
|
|
|
Not exactly sure what you are trying to do. It really depends on the context of your application. If the value is being persisted (in a file, database, etc.) then you can use an if statement to convert true to -1 in order to keep consistent with old data. But if being used in some sort of a comparison, lets say, then you need to evaluate what it's being compared to and make a decision around that.
BTW, have you looked at any of the available automated VB.NET to C# converters out there? There are some free ones too.
|
|
|
|
|
Why don't you write your own function that does the job?
private int ConvertVBBoolToInt(bool val)
{
return (val ? -1 : 1);
}
|
|
|
|
|
Maybe I am showing some low-level ignorance of data types here but I just don't understand why we have these
VB.NET
Short
Integer
Long
C#
short
int
long
When we have these:
System.Int16
System.Int32
System.Int64
Can anyone explain this to me?
If it is just for backwards compatibility with code on the part of VB I don't really buy it because the same things are there in C# and there should not have been any backwards issues with 'old C# code' to worry about.
Anyone want to enlighten me?
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
I believe that the System ones are objects, and the other ones are basic types, which means among other things that you can't do if myObject is short
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I don't think that's correct, the C# keywords are just aliases for the System classes. So int is exactly the same as System.Int32, which derives from System.Object. It is the same in VB.NET too.
As to why they added aliases, maybe it is to preserve the feel of the language.
Regards
Senthil
|
|
|
|
|
Hi,
I've got a C# .NET forms application - I need to make this program support a number of differant languages. I've done the basics of getting it ready to be localized. i.e. I have all my strings stored in a simple text file with keys and they get compiled into satellite DLL's so I can add new languages and the app will use them.
However I have a question regarding the best way to manage this process. At the moment I have a strings.txt file, which contains strings that are used in the program such as error messages.
Then the UI, each Window in the program and the dialogs etc, they all have their own language-strings and prompts actually just add'ed to them in the VS.NET designer.
I know that each Windows Form has a .resx file which contains all the resources, including these strings.
I guess my question is, how can I simplfy the process of adding new languages - I pretty much don't want to have to sit there, make each form "Localizable" and then type each different language version in to the VS.NET IDE.
Especially as I'm not the one doing the translating.
Is there anyway to get the UI to use strings from a non-default resource file as such? Maybe so I could get all the strings in one place and then send them away to be translated.
Is there is a simple way to do this that I'm missing?
Thanks
Simon
|
|
|
|
|
I want to get physical address of NIC in .Net Framework. Please help me!
|
|
|
|
|
Try the ARP command which displays the physical address. You can use the System.Diagnostics.Process class to run the ARP command from .NET.
|
|
|
|
|
Hi,
My NET debuggers do not work. I get an error:
"Error while trying to run project:Unable to start debugging.
No such interface supported."
Note that this is not the commonly mentioned web debugger problem.
I have tried completely uninstalling VS NET and re-installing. Did not fix.
Any suggestions?
Thanks,
Robert
|
|
|
|
|
I finally tried uninstalling IE6 and re-installing IE6. Now my debuggers work, but the startup page throws script errors.
Arrgggghh!!
Robert
|
|
|
|
|
OK, I'm ready to be ridiculed.
I've run into an issue when attempting to use strong names. I've followed darwen's example and have it working in a console app, but it fails in a windows app with
An unhandled exception of type 'System.Security.SecurityException' occurred in StrongNameTestForm.exe
Additional information: Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
(additional details at the bottom of this message) or (if not run in the ide)
The application attempted to perform an operation not allowed by the security policy. The operation required the SecurityException. To grant this application the required permission please contact your system administrator, or use the Microsoft .NET security policy administration tool.
If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will be shut down immediately.
Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlig, Version-1.0.50000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
If I change the application from a windows app to a console app the call works in main() [before Application.Run(new Form1());], but not in the button click event from the form.
I've run the .NET Configuration tool (mscorcfg.msc) and tried adding an application and adding a code group (enterprise, machine, and user; new code group with a condition of Strong Name with the public key [the dll, the console app, and the windows app all show the same public key] without specifying the name or version and with the permission set of full trust) all to no avail. I have also tried this on multiple machines.
I do have a small (59k) zip file of my solution and projects, if anyone is interested.
Additional details:
************** Exception Text **************
System.Security.SecurityException: Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckTokenBasedSetHelper(Boolean ignoreGrants, TokenBasedSet grants, TokenBasedSet denied, TokenBasedSet demands)
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet denied, PermissionSet demands)
at StrongNameAssembly.StrongNameTestAssembly.StaticEcho(String text) in C:\dl\dotNET\code samples\Securing\StrongNameTest\StrongNameAssembly\StrongNameTestAssembly.cs:line 31
at StrongNameTestForm.Form1.btnStaticTest_Click(Object sender, EventArgs e) in c:\dl\dotnet\code samples\securing\strongnametest\strongnametestform\form1.cs:line 108
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The state of the failed permission was:
<ipermission class="System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
="" version="1" publickeyblob="002400000480000094000000060200000024000052534131000400000100 01009515D3907C35834756D430D20B8C4672668C3CAC0EFF041317166F8CC53FDA01CE72D7C 728A942762957F6A7A2264656EBCE5C04078AAFD3E6F7FFFB6ADC799AB011CED46D9B6129F1 1E6517144138B57C85865CBC56E4F2BFFF6651F3FF702F0E039F16CEE9F31B976B51A582977 478B3DD0A52CAC873814646F01FABC8E2BE">
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
StrongNameTestForm
Assembly Version: 1.0.1865.20729
Win32 Version: 1.0.1865.20729
CodeBase: file:///C:/dl/dotNET/code%20samples/Securing/StrongNameTest/StrongNameTestForm/bin/Debug/StrongNameTestForm.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
StrongNameAssembly
Assembly Version: 1.0.1865.19430
Win32 Version: 1.0.1865.19430
CodeBase: file:///C:/dl/dotNET/code%20samples/Securing/StrongNameTest/StrongNameTestForm/bin/Debug/StrongNameAssembly.DLL
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
|
|
|
|
|
I've found the problem (thanks to others).
I was using SecurityAction.Demand rather than SecurityAction.LinkDemand.
Demand checks all assemblies in the stack for permission. Obviously there was some issue with permissions on one of the .NET assemblies, but I'm not going to worry about it.
|
|
|
|
|
Hi!
Is there a way I can tell when a class library is loaded.
I want a static item in in a class library when it's loaded and then if it's unloaded I want to remove this item.
Is this possible?
|
|
|
|
|
Why don't you simply put it in a type constructor (or declare it as static)? That way, it will run before any field in that type is accessed. What's the point in removing the item if the assembly itself is going to be unloaded?
Regards
Senthil
|
|
|
|
|
Hi,
I need some with the Socket programming in C#. I’m a old Borland C++ Builder and converted to .NET some years ago. But I still miss a lot of nice features :-> Can anybody here help me with getting a “event”, interrupt or callback when one end of a socket connection disconnects. I’m not thinking about when a user or application disconnects deliberately but more like when someone pulls the cable or switches off the pc.
Can some one help me?
/ Magnus
|
|
|
|
|
well, I'm trying to write a .NET 2.0 application (since I need serial-ports and I hate using non-.NET-components) but I have a problem...
every time I run my programm (serial-ports don't do anything yet so that shouldn't be the problem) I get a NullReferenceException...
when I try to run it with the debugger, first it's about 500times slower and second the exception isn't thrown at all but the debugger locks up somewhat later...
I'm using threads so maybe that could be the cause but the main problem I got is:
when the exception is thrown (without debugger) it gives me the option to launch the jit-debugger... but when I click to launch it it launches visual studio 2003; and that just can't debug .NET 2.0
so:
how do I get the jit-debugger to use vs2005?
any idea?
thanks, so long.
|
|
|
|
|
Hi...
I can't seem to get the column name stored in a string.
It keeps giving me this error:
Embedded statement cannot be a declaration or labeled statement
This is what I am trying to do..
for(int col=0; col
|
|
|
|
|
Your for loop isnt complete:
for (int col = 0; col < personTbl.Columns.Count; i++) {
string colName = personTbl.Columns[col].ColumnName;
}
|
|
|
|