?
Oder noch einfacher so.
struct PaperName { wchar_t mPaperName[64]; };
std::vector<std::wstring> paperNamesVector;
int numPaperNames = ::DeviceCapabilities(printerName.c_str(), portName.c_str(), DC_PAPERS, NULL, NULL);
if (numPaperNames > 0)
{
paperNamesVector.resize(numPaperNames);
PaperName * paperNamesBuffer = new PaperName[numPaperNames];
DeviceCapabilities(printerName.c_str(), portName.c_str(), DC_PAPERNAMES, (LPTSTR)paperNamesBuffer, NULL);
for (int i = 0; i < numPaperNames; i++)
paperNamesVector[i] = paperNamesBuffer[i].mPaperName;
delete[] paperNamesBuffer;
}