User Profile

Collapse

Profile Sidebar

Collapse
Toni
Toni
Last Activity: Sep 23 '06, 09:43 PM
Joined: Sep 10 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Toni
    replied to Converting LPCSTR to LPVOID
    in C
    Thanks!
    I'm now developing a driver which uses these arguments....
    I can use it with DbgPrint but not with memcmp...this is the code ,
    PCHAR pInputBuffer = Irp->AssociatedIrp. SystemBuffer;
    if(pInputBuffer ) {
    if(StringNullTe rminated(pInput Buffer,irpStack->Parameters.Dev iceIoControl.In putBufferLength ,&dwDataRead) )
    {
    test = (const void*)pInputBuf fer;
    DbgPrint(test);
    }
    if(0...
    See more | Go to post
    Last edited by Toni; Sep 20 '06, 10:04 PM. Reason: value change

    Leave a comment:


  • Toni
    replied to Converting LPCSTR to LPVOID
    in C
    Okay , i fixed it! , but it did work fine with sizeof
    this was the code:
    char test[256] = {"TEST"};
    char szTemp[256] = {0};
    DeviceIoControl (driverHandle, CHANGE_PREFIX, test, sizeof(test), szTemp, sizeof(szTemp), &dwReturn, NULL);

    But now i did got another problem , i can't use this code:
    LPCSTR test_str = "TEST";
    char test[256] = {(char)test_str };

    do...
    See more | Go to post

    Leave a comment:


  • Toni
    replied to Converting LPCSTR to LPVOID
    in C
    well.... i think i did have to declare an LPVOID because of the MSDN docs...
    See more | Go to post

    Leave a comment:


  • Toni
    replied to Converting LPCSTR to LPVOID
    in C
    Well....it doesn't send the string to the driver...
    See more | Go to post

    Leave a comment:


  • Toni
    started a topic Converting LPCSTR to LPVOID
    in C

    Converting LPCSTR to LPVOID

    Hello Everyone ,
    I'm trying to convert an LPCSTR to LPVOID for use in DeviceIOControl .
    But when i use LPVOID test = (LPVOID)test_lp cstr then it doesn't work ,
    When i use LPVOID test = "TEST" , then it works , so it must have something to do with the conversion.
    Any ideas ?

    Note: i'm very new to C++
    Sorry for my poor english

    Edit: DeviceIoControl (driverHandle, CHANGE_PREFIX,...
    See more | Go to post
No activity results to display
Show More
Working...