converting narrow string to wide string

If the source is ASCII encoded, you can just do this:

wstring printerName;
printerName.assign( myName.begin(), myName.end() );

Leave a Comment