Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

merh

@merh
About
Posts
21
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How can I add two byte[1] + byte[2]?
    M merh

    Thanks it works now on my system too. /Mehran

    C# question

  • How can I add two byte[1] + byte[2]?
    M merh

    Yes, I mean something like this int i; byte[] s ={ 10, 20 }; int result=0; for (i = 0; i <= 1; i++) result += s[i];

    C# question

  • How can I add two byte[1] + byte[2]?
    M merh

    I have an array of bytes. s below is my array and I try to read byte nr 0 and add to nr 1. for(int i=0; i<=1; i++) int result += s[i]; Thanks Merh

    C# question

  • How can I add two byte[1] + byte[2]?
    M merh

    Hi, I have two bytes which I need to obtain the sum of them. I have done like this but the result is wrong. int result = byte[1] + byte[2]; How can I do that? Thanks in advanced Merh

    C# question

  • ThreadStart issue
    M merh

    Thanks

    C# help data-structures question

  • ThreadStart issue
    M merh

    Hi, I need your help to clarify the following.I try to run a method with the parameters on own thread. But I get the error. public class MyQueue { Queue myQueue = new Queue(); public void Enqueue(PacketHeader p, byte[] s) { Data data = new Data(p, s); myQueue.Enqueue(data); } } m_myQueue = new MyQueue(); Thread thread = new Thread(new ThreadStart(m_myQueue.Enqueue(????))); thread.Start(); Thanks in advanced Mehran

    C# help data-structures question

  • why wrong radioButton method is invoched=
    M merh

    Thanks.

    C# json help

  • why wrong radioButton method is invoched=
    M merh

    Hi, I have 10 radioButtons and when I first time select radioButton1 on GUI everthying works well, I see the method radioButton1_CheckedChanged_1 has been invocked. But after when I select radioButton2 I see first that the radioButton1_CheckedChanged_1 has been invocked an after that radioButton2_CheckedChanged_1 and same behaviour for the rest of radio buttons. Can somebody help me with the isuue that when I select a radio button then the right radiobutton method is going to be invocked. Thanks in advanced mehran

    C# json help

  • Convert the string to ASCII(HEX)
    M merh

    thanks I have found the solution. Explanation "s" is a byte array and 0x0 is the first element int counter = 0x0 + i; string Number = s[counter].ToString(); int number = int.Parse(Number); destinationAdress += number.ToString("x2");

    C# help

  • Convert the string to ASCII(HEX)
    M merh

    Hi, I need help how I can convert the string below to ASCII(HEX) for (int i = 0; i<=5; i++) { int counter = 0x0 + i; string destinationAdress += (char)s[counter]; ... } Thanks in advaced merh

    C# help

  • convert hex to ascii
    M merh

    Hi, my code reads a byte which is 0x41 hex. and I would like to convert it to ascii which is character "A" int hex = s[a]; can somebody help me with this? Thanks in advanced, merh

    C# help question

  • Plz can anyone help me to get a code in c# that extract Ethernet type
    M merh

    Ethertype is in the byte[] s but I dont know how I can extract it. Regards mehran

    C# csharp help question

  • Plz can anyone help me to get a code in c# that extract Ethernet type
    M merh

    Plz can anyone help me to get a code in c# that extract Ethernet type. I have a function which I recieve Ehternet Packet but I dont know how I can get out Ehternet type from it. Thanks in advanced Merh private void ReceivePacket(object sender, PacketHeader p, byte[] s) { this.pack_count++; rtb.Focus(); rtb.AppendText("Content of p : \n"); rtb.AppendText(" Caplength: " + p.Caplength + "\n"); rtb.AppendText(" Length : " + p.Length + "\n"); rtb.AppendText(" Timestamp: " + (p.TimeStamp) + "\n"); Ethernet type????? }

    C# csharp help question

  • How to extract Ethernet type? [modified]
    M merh

    Plz can anyone help me to get a code in c# that extract Ethernet type. I have a function which I recieve Ehternet Packet but I dont know how I can get Ehternet type from it. Thanks in advanced Merh private void ReceivePacket(object sender, PacketHeader p, byte[] s) { this.pack_count++; rtb.Focus(); rtb.AppendText("Content of p : \n"); rtb.AppendText(" Caplength: " + p.Caplength + "\n"); rtb.AppendText(" Length : " + p.Length + "\n"); rtb.AppendText(" Timestamp: " + (p.TimeStamp) + "\n"); Ethernet type????? }

    modified on Thursday, March 27, 2008 4:09 AM

    C# csharp help tutorial question

  • Chrash at UpdateData(FALSE)
    M merh

    Thanks a lot it works. Have a nice weekend M.H

    C / C++ / MFC help c++ data-structures security announcement

  • Chrash at UpdateData(FALSE)
    M merh

    Hi, I need how I can use PostMessage for sending the message with some parameters to main thread(window) and then how I can read the data from It. Best regards Mehran

    C / C++ / MFC help c++ data-structures security announcement

  • Chrash at UpdateData(FALSE)
    M merh

    Hi, have got the crash at BOOL AFXAPI AfxAssertFailedLine(LPCSTR lpszFileName, int nLine) { #ifndef _AFX_NO_DEBUG_CRT // we remove WM_QUIT because if it is in the queue then the message box // won't display MSG msg; BOOL bQuit = PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE); BOOL bResult = _CrtDbgReport(_CRT_ASSERT, lpszFileName, nLine, NULL, NULL); if (bQuit) Thanks Mehran

    C / C++ / MFC help c++ data-structures security announcement

  • Chrash at UpdateData(FALSE)
    M merh

    Hi Thanks, It still dosent work. I get the following error 'CSurveyUpdateDlg' : is not a class or namespace name 'WMU_SETVALUE1' : undeclared identifier If you have a email adress I can send you my workspace which you can test it easier. For your information I have VC++ 6.0 Thanks M.H

    C / C++ / MFC help c++ data-structures security announcement

  • Chrash at UpdateData(FALSE)
    M merh

    First of all thanks a lot. It dosent work. I have the following interface you mentioned that I could use pDlg->PostMessage(WMU_SETVALUE1, (WPARAM)i,(LPARAM)b); where is comming pDlg? I have got error at CWnd * pDlg = (pDlg*)lpParam; and pDlg->PostMessage(WMU_SETVALUE1, (WPARAM)i,(LPARAM)b); I have copied all files maybe you can see my problem better Thanks M.h // ThreadDlg.cpp : implementation file // #include "stdafx.h" #include "Thread.h" #include "ThreadDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif #ifndef GLOGAL #define GLOBAL int Globalvariable; #endif class CAboutDlg : public CDialog { public: CAboutDlg(); // Dialog Data //{{AFX_DATA(CAboutDlg) enum { IDD = IDD_ABOUTBOX }; //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAboutDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: //{{AFX_MSG(CAboutDlg) //}}AFX_MSG DECLARE_MESSAGE_MAP() }; CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) { //{{AFX_DATA_INIT(CAboutDlg) //}}AFX_DATA_INIT } void CAboutDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAboutDlg) //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) //{{AFX_MSG_MAP(CAboutDlg) // No message handlers //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CThreadDlg dialog CThreadDlg::CThreadDlg(CWnd* pParent /*=NULL*/) : CDialog(CThreadDlg::IDD, pParent) { //{{AFX_DATA_INIT(CThreadDlg) m_Value1 = _T(""); //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CThreadDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CThreadDlg) DDX_Text(pDX, IDC_VALUE1, m_Value1); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CThreadDlg, CDialog) //{{AFX_MSG_MAP(CThreadDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_MESSAGE(WMU_SETVALUE1,OnSetValue1) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CThreadDlg message handlers BOOL CThreadDlg::OnInitDialog() { CDialog::OnInitDialog(); // Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system comman

    C / C++ / MFC help c++ data-structures security announcement

  • Chrash at UpdateData(FALSE)
    M merh

    Please, can somebody show me how I can do that? Thanks M.H

    C / C++ / MFC help c++ data-structures security announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups