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

Search:

Type: Posts; User: Vila

Search: Search took 0.02 seconds.

  1. Replies
    2
    Views
    22,150

    MSChart and Auto X axis

    Hi, in runtime I can see that X-axis limits of my chart (minimum and maximum) are automatically changed as I insert points. That's nice. So I came to an idea to change that minimum and maximum...
  2. Re: Structure raises linker exception multiple definition of

    Ok I make them non-static (i made them static while attempting to solve my problem xD and obviously buried my self even deeper), and now when i removed that I compiled my code without any errors. Now...
  3. Re: Structure raises linker exception multiple definition of

    Yeah it is to my eye, but not to my linker xD
    Only for you i made this code 2 seconds ago and tried to compile:



    //main.cpp
    #include <iostream>

    using namespace std;
  4. Re: Structure raises linker exception multiple definition of

    That's a typo i made while typing code to this site. Code is flawless in my actual program and members don't have generic names like myMember1. Still i have:

    Undefined reference to...
  5. Structure raises linker exception multiple definition of

    As I read from some online examples structures should work like this:


    struct nameOfStruct
    {
    int myMember1;
    short myMember2;
    };

    int main()
  6. Replies
    3
    Views
    1,086

    Re: WriteFile writes zero's instead of my bytes

    I thought that short is 8bit unsigned integer, and it turns out it is 16bit integer. Sorry about that. Will use unsigned char.
  7. Replies
    3
    Views
    1,086

    Re: WriteFile writes zero's instead of my bytes

    If I call with bufflen = 12 then ret = 12 and in file:

    01 00 02 00 03 00 04 00 05 00 06 00.

    This is confusing...
  8. Replies
    3
    Views
    1,086

    WriteFile writes zero's instead of my bytes

    Code in C++:

    short buffer[6];
    buffer[0] = 1;
    buffer[1] = 2;
    buffer[2] = 3;
    buffer[3] = 4;
    buffer[4] = 5;
    buffer[5] = 6;
    short *p = &buffer[0];
  9. Re: Opening device with CreateFile fails with error code 5 ERROR_ACCESS_DENIED

    But, it is non-standard device eg. not recognized as keyboard or mouse. Confusing, but true.
  10. Re: Opening device with CreateFile fails with error code 5 ERROR_ACCESS_DENIED

    Yes it has specific vid and pid (and i know them). But, device puts data on "keyboard" eg. it does keypresses of data, so I detect them with GetAsyncKeyState (and that works and it isn't problem), so...
  11. Re: Opening device with CreateFile fails with error code 5 ERROR_ACCESS_DENIED

    I understand this is jumping from subject to subject (WinAPI -> DirectX), but I am trying to solve above mentioned problem:



    Any solution is acceptable :)

    So I tried DirectX function to...
  12. Re: Opening device with CreateFile fails with error code 5 ERROR_ACCESS_DENIED

    DeviceIoControl also returns error code 5 ACCESS_DENIED. :(




    Yeah it is, i was trying that function and then tried WriteFile and decided I need WriteFile and forgot to change the name of...
  13. Re: Opening device with CreateFile fails with error code 5 ERROR_ACCESS_DENIED

    I managed to put it down to this:

    I opened device for writing (maybe not good?) like this:

    DeviceHandle = CreateFile _
    (DeviceName, _
    GENERIC_WRITE, _...
  14. Re: Opening device with CreateFile fails with error code 5 ERROR_ACCESS_DENIED

    A DT-Box which purpose is to convert SY-4 to USB (eg. I have a device that returns some values and this box is seen by Windows as Human Interface Device).

    Box has one button which sends data taken...
  15. Opening device with CreateFile fails with error code 5 ERROR_ACCESS_DENIED

    Hi,

    I must confess I don't do this in c++, but since there is no forum for vb.net, I'll try to make it simple (If you disagree on this thread being here please feel free to delete it).

    I call...
  16. Thread: C++ question.

    by Vila
    Replies
    6
    Views
    1,213

    Re:

    I just read it.
    I will respect forum rules in future.
    Thanks for telling me that. :)
  17. Thread: C++ question.

    by Vila
    Replies
    6
    Views
    1,213

    Re: delete

    OK.

    I am sorry, OK?
  18. Replies
    5
    Views
    4,245

    Re: cout Extended ASCII characters ain't working

    Thanks.

    That characters were 176,177,178,219 (it isn't 'some other character').

    And I use wrong code page (1252).

    So will you tell me how to change code page.

    And, just for the record, I...
  19. Replies
    5
    Views
    4,245

    Re: cout Extended ASCII characters ain't working

    Yes. But what do you mean by code page (Can you describe what is code page?)?

    I fought the problem was with preprocessor definitions.

    It was: WIN32;_DEBUG;_CONSOLE

    so I added: _UNICODE...
  20. Replies
    5
    Views
    4,245

    cout Extended ASCII characters ain't working

    I can't make program print what I want!
    I type this script:

    int main()
    {
    cout << "█▓▒░\n";
    return 0;
    }

    and all I get on console is:
Results 1 to 20 of 21





Click Here to Expand Forum to Full Width

Featured