Click here to Skip to main content
15,884,064 members
Home / Discussions / C#
   

C#

 
GeneralRe: If existing String Form name, get that by database then open Pin
V.15-Mar-13 3:44
professionalV.15-Mar-13 3:44 
GeneralRe: If existing String Form name, get that by database then open Pin
Mycroft Holmes15-Mar-13 13:39
professionalMycroft Holmes15-Mar-13 13:39 
QuestionResolving dependent projects Pin
Bernhard Hiller15-Mar-13 0:15
Bernhard Hiller15-Mar-13 0:15 
AnswerRe: Resolving dependent projects Pin
Pete O'Hanlon15-Mar-13 1:38
mvePete O'Hanlon15-Mar-13 1:38 
Questionsubstring from form1 to form2.... Pin
Goaty6510914-Mar-13 17:15
Goaty6510914-Mar-13 17:15 
AnswerRe: substring from form1 to form2.... Pin
Jibesh14-Mar-13 17:35
professionalJibesh14-Mar-13 17:35 
GeneralRe: substring from form1 to form2.... Pin
Goaty6510914-Mar-13 18:57
Goaty6510914-Mar-13 18:57 
QuestionBlueTooth Bytes Disappearing Pin
C-P-User-314-Mar-13 13:03
C-P-User-314-Mar-13 13:03 
My small box sends the same byte continuously to the PC across a bluetooth connection.

After successfully receiving about four thousand bytes (give or take a few hundred) no more bytes are seen. I am quite confident that the bytes (a whole lot more than four thousand) continue to be sent well after the stream disappears from the rest of the system.

I am highly suspicious that Windows is somehow, for some reason, not accurately giving these bytes to my app.

My suspicion has been heightened because my external transmitting box continued after I stopped the app. I restarted the app, and I got 941 "left over" bytes, from where, I don't really know (but my external byte generator had been silent for several minutes, so it was no longer sending data).

We then started the small box generating continual data again, and saw the same behavior: 4435 bytes were seen, despite a two minute flood of bytes at 921600 bps.


Here is the receive thread


C#
void RecieveThread()
 {
     int n;

     while (continueRecieving)
     {
         n = connectorPort.BytesToRead;

         byte[] bits = new byte[n];

         if (n > 0)
         {
             connectorPort.Read(bits, 0, n);
         }

         Write(bits);
     }
 }



Just in case anyone feels it's important, here is the Write(bits) routine

C#
public void Write(byte[] b)
{
    if (writting)
    {
        for (int i = 0; i < b.Length; i++)
        {
            storage[sPlace++] = b[i];

            pass += b[i].ToString("X2") + " ";

            if (sPlace % numericUpDown1.Value == 0)
            {
                pass += "\r\n";
            }
        }
    }
}




Has anyone previously experienced disappearing bluetooth bytes on a Win7 machine with a C# app ?
QuestionView in Nhibernate Pin
hadi_ganji14-Mar-13 6:06
hadi_ganji14-Mar-13 6:06 
AnswerRe: View in Nhibernate - Repost Pin
Richard MacCutchan14-Mar-13 6:24
mveRichard MacCutchan14-Mar-13 6:24 
QuestionUnable to set registry value Pin
sjs4u13-Mar-13 21:27
sjs4u13-Mar-13 21:27 
AnswerRe: Unable to set registry value Pin
dusty_dex14-Mar-13 5:07
dusty_dex14-Mar-13 5:07 
QuestionHow to use CreateTextServices in C# Pin
cpw999cn13-Mar-13 20:32
cpw999cn13-Mar-13 20:32 
AnswerRe: How to use CreateTextServices in C# Pin
Bernhard Hiller13-Mar-13 22:01
Bernhard Hiller13-Mar-13 22:01 
GeneralRe: How to use CreateTextServices in C# Pin
cpw999cn13-Mar-13 22:40
cpw999cn13-Mar-13 22:40 
QuestionC# Receive from TCP send to COM2 Pin
dockwomblejr13-Mar-13 11:55
dockwomblejr13-Mar-13 11:55 
AnswerRe: C# Receive from TCP send to COM2 Pin
jschell14-Mar-13 7:57
jschell14-Mar-13 7:57 
GeneralRe: C# Receive from TCP send to COM2 Pin
dockwomblejr14-Mar-13 13:05
dockwomblejr14-Mar-13 13:05 
GeneralRe: C# Receive from TCP send to COM2 Pin
micke.andersson15-Mar-13 6:03
micke.andersson15-Mar-13 6:03 
Questionhow can i index files in c# Pin
Member 888804413-Mar-13 10:26
Member 888804413-Mar-13 10:26 
AnswerRe: how can i index files in c# Pin
R. Giskard Reventlov13-Mar-13 10:40
R. Giskard Reventlov13-Mar-13 10:40 
QuestionSplit with Regex Pin
Revolty13-Mar-13 8:21
Revolty13-Mar-13 8:21 
AnswerRe: Split with Regex Pin
Dave Kreskowiak13-Mar-13 9:30
mveDave Kreskowiak13-Mar-13 9:30 
GeneralRe: Split with Regex Pin
SledgeHammer0113-Mar-13 9:33
SledgeHammer0113-Mar-13 9:33 
GeneralRe: Split with Regex Pin
Dave Kreskowiak13-Mar-13 9:46
mveDave Kreskowiak13-Mar-13 9:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.