Results 1 to 6 of 6

Thread: cannot convert parameter 2 from 'char [80]' to 'LPWSTR'

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default cannot convert parameter 2 from 'char [80]' to 'LPWSTR'

    Hi,
    I am using QT-4.3 and Using Visual Studio-2005 for compiling. I need to find the Web camera in windows. For that I use this command,

    Qt Code:
    1. char szDeviceName[80];
    2. char szDeviceVersion[80];
    3.  
    4. for(int iPos = 0; iPos<2; iPos++)
    5. {
    6. if (capGetDriverDescription( iPos, szDeviceName, sizeof (szDeviceName),
    7. szDeviceVersion,
    8. sizeof (szDeviceVersion)
    9. ))
    10.  
    11. qDebug()<< " driverName " << driverName;
    12. }
    To copy to clipboard, switch view to plain text mode 
    when I try this, at the time of compiling VS-2005 display an error like this,

    'capGetDriverDescriptionW' : cannot convert parameter 2 from 'char [80]' to 'LPWSTR'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    Please help me to solve this probs
    Last edited by marcel; 4th December 2007 at 08:43. Reason: Added code tags.

Similar Threads

  1. unable to save QCStrings properly in a buffer
    By nass in forum Qt Programming
    Replies: 13
    Last Post: 15th November 2006, 20:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.