|
Can any one help in finding tutorial/sample for Serial Port Communication (COM)in C#.
thanks,
Sanjeev
|
|
|
|
|
Check this article out ...
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=320
though the author's picture is a bit of a worry
- James
|
|
|
|
|
I read that article but I don't want to use ActiveX control...
|
|
|
|
|
There is an example on MSDN - but I don't have the link handy. No ActiveX, a complete Win32 wrap. It is written in VB however, so you would have to translate it to C#. I'm considering doing that myself, but I'm not sure I could get it right
Bill F
|
|
|
|
|
its probably been asked before, but, i need to find out the icon for a folder, cd drive, etc, i believe this is in the shell32.dll file, but i am not sure how to load resources forom files.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
|
|
You really need not look further than home.
David Stone
But Clinton wasn't a predictable, boring, aging, lying, eloquent, maintainer-of-the-status-quo. He was a predictable, boring-but-trying-to-look-hip, aging-and-fat-but-seemingly-oblivious-to-it, lying-but-in-sadly-blatant-ways, not-eloquent-but-trying-to-make-up-for-it-by-talking-even-more, bringer-in-of-scary-and-potentially-dangerous-new-policies. And there was also Al Gore. It just wasn't *right*.
Shog9
|
|
|
|
|
|
|
I get an error when I try to do something like:
byte[] myByte;
myByte = (byte[])e.PostData;
Am I doing this wrong?
Nick Parker
|
|
|
|
|
|
Could you show an example, or do you know of a link to one?
Nick Parker
|
|
|
|
|
|
|
|
Not sure, I will go check, I was help someone else here at work with it. I'll go check?
Nick Parker
|
|
|
|
|
Actually he did something different, the MemoryStream didn't error out, however it didn't return anything. He has it working now though, Thanks.
Nick Parker
|
|
|
|
|
I was wanting to replace my 'first' name with an edit that the user has performed. I am breaking up the information well, thanks to Eric Gunnerson's marvelous little regex program.
Regex regName = new Regex( @"?< Last >[^,]+)*(,)*( )*(?< First >\S+)*( )*(?< Middle >.+)$" );
String strFirst = "Jane";
String strCurrent = "Doe, John William";
Match pMatch = regName.Match( strCurrent );
if( pMatch.Success )
{
Group pGroup = pMatch.Groups[ " First " ];
if( pGroup.Index > 0 )
strReplace = strText.Substring( 0, pGroup.Index );
strReplace += strFirst;
if( pGroup.Index + pGroup.Length < strText.Length )
strReplace += strText.Substring( pGroup.Index + pGroup.Length );
}
|
|
|
|
|
The ToString(); method isn't doing it, is there another way?
Nick Parker
|
|
|
|
|
|
I believe you can also use BitConverter.ToString(), I don't have the documentation to hand, but I'm pretty sure thats it. The only parameter to ToString is the array AFAIK.
--
Paul
"I need the secure packaging of Jockeys. My boys need a house!"
- Kramer, in "The Chinese Woman" episode of Seinfeld
MS Messenger: paul@oobaloo.co.uk
Sonork: 100.22446
|
|
|
|
|
|
|
I guess the signatures are wrong, produce an exception in CLR, but are trapped in /dev/null so you don't see a sh*t.
In other words, your SomeFunc doesn't even have a return value. Was the code snippet a real code ?
This should be :
[DllImport("SomeLib.dll"), CharSet=CharSet.Auto)]
public static extern <something> SomeFunc(MyCallback callback);
public delegate int MyCallback(int bla, string foo);
And I swallow a small raisin.
|
|
|
|