CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: hypheni

Page 1 of 5 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    11
    Views
    375

    Re: Detecting Garbage chars in CString

    Well the code is buggy as I asked to the original author.

    Ans.
    1. Yes
    2. 0 index holds some discard able data
    3. Well, I omitted that line and working same, but it is the indicator for the end...
  2. Replies
    11
    Views
    375

    Re: Detecting Garbage chars in CString

    BYTE ucData[60];

    for(int i = 0;i<60;i++)
    ucData[i] = 0;

    short iNoOfReadByte = (short)m_DsiSerialComm.ReadCommPort(ucData, 60);
    CString cstrReadData = _T("");
    CString cstrTemp =...
  3. Replies
    11
    Views
    375

    Re: Detecting Garbage chars in CString

    Actually I'm reading from COM port in BYTE array and then casting it to CString for printing in Log where it is printing value: 0 0 4 131
  4. Replies
    11
    Views
    375

    Detecting Garbage chars in CString

    How do I detect garbage chars in a CString. Actually I'm reading some data from COM port. In some certain condition it will give some garbage as a version no. Now I need to show _T("N/A") in case of...
  5. Re: _stprintf_s - Out of bound access

    Okay, Correct I missed it.
  6. Re: _stprintf_s - Out of bound access

    Another quick solution would be



    WORD iDay;
    TCHAR text[3];
    if(iDay <= 31)
    _stprintf_s(text, sizeof(text), _T("%d"), iDay);
  7. [RESOLVED] _stprintf_s - Out of bound access

    WORD iDay;
    TCHAR text[3];
    _stprintf_s(text, sizeof(text), _T("%d"), iDay);


    The above piece of code giving some out of bound access error by some Static code analyser. The iDay is used for...
  8. Replies
    3
    Views
    380

    Re: CStatic control ID

    Okay. Though in my code these event are not being handled. Still I use unique ID using resource adding method and destroying it before calling CStatic::Create().

    Is there any better way ?
  9. Replies
    4
    Views
    312

    Re: access member function

    Use a global or create a dynamic instance inside your non member function.
  10. Re: I"m a NOOB...Why isn't my code working!?

    I"m a NOOB...Why isn't my code working!
    You answered your own why your code is not working.

    Before start posting you should go through forum rules once, use Code tags in your post first.
  11. Replies
    3
    Views
    380

    CStatic control ID

    I'm using CStatic inherited class in my code and creating static text boxes dynamically. Now for assigning unique control ID I'm creating a static control from resource editor and destroying it...
  12. Replies
    7
    Views
    609

    Re: IPHelper API query

    These days CodeGuru is inactive or Gurus didn't work with IPHelper much ? No such replies.
  13. Replies
    7
    Views
    609

    Re: IPHelper API query

    Just a small update. I tried both API in my sample application and application reaches using 6MB of memory where as using GetAdaptersInfo takes only 1.5MB memory.

    Wasting 4.5MB memory only for...
  14. Replies
    7
    Views
    609

    Re: IPHelper API query

    So far I have completed other work except a few, what should be better approach to get the Connection name.

    GetAdaptersInfo returns GUID for the NIC, if using this way to get Connection Name I...
  15. Replies
    7
    Views
    609

    Re: IPHelper API query

    Will get back to this thread once I completed with GetAdaptersInfo and its testing on Xp, Vista, 7 including x64 version.
  16. Replies
    7
    Views
    609

    Re: IPHelper API query

    Hmm, currently in my case no reason to use GetAdaptersAddess over GetAdaptersInfo except msdn, cause I'm not gonna support IPv6.
  17. Replies
    7
    Views
    609

    IPHelper API query

    As per msdn we should use GetAdaptersAddresses() instead of GetAdaptersInfor() for Windows XP and later. I need to get all information for NIC ie: IP, Subnet, Gateway, DNS, WINS.

    GetAdaptersInfo()...
  18. Replies
    6
    Views
    479

    Re: Retrieve IP information on any Windows

    Well, thanks.
  19. Replies
    6
    Views
    479

    Re: Retrieve IP information on any Windows

    Yes, I did check the API's support, but some says on feedback it doesn't work on Win 7 64bits, anyways which one is better. API or Registry manipulation ?
  20. Re: Debug settings lost after Migrating VS2008 project to another computer

    Rename <Proj-Name>.vcproj.<Domain>.<Username>.user to <Proj-Name>.vcproj.user before copying the project files to other computer.

    And if you are overwriting project files on target machine then...
  21. Replies
    6
    Views
    479

    Retrieve IP information on any Windows

    I used to retrieve IP and NIC information by querying windows registry. Now I'm trying to use GetAdapterAddresses() API. Using GetAdapterAddresses() to get IP is not that easy, I need to dig a long...
  22. Replies
    2
    Views
    404

    Re: manifest embedd doubt

    Actually VS 2005's mt.exe has some problem, one warning comes if I use manifest by my 1st method.

    And what I observed was that if I embed manifest (without any dependency) using 1st method I get...
  23. Replies
    2
    Views
    404

    manifest embedd doubt

    I use manifest for win 7 application. My application is linked with MFC Static Library so do I need to put decencies in manifest file?

    Old manifest with dependency


    <?xml version='1.0'...
  24. Replies
    5
    Views
    676

    Re: TCHAR '\' use, adds space

    Yes Im trying to continue my code next line.


    Igor your method worked.
  25. Replies
    5
    Views
    676

    TCHAR '\' use, adds space

    When Im using the following code



    CString cstrTemp = _T("Sample text goes here Line 1\
    Sample text goes here Line 2\
    Sample text goes here Line 3\");

    AfxMessageBox (cstrTemp);
Results 1 to 25 of 115
Page 1 of 5 1 2 3 4



HTML5 Development Center

Click Here to Expand Forum to Full Width