qt创建 PPPOE宽带连接出错
tmh 2012-06-27 02:13:58
代码:
strcpy(rasentry.szDeviceName,"WAN 微型端口 (PPPOE)");
strcpy(rasentry.szDeviceType,RASDT_PPPoE);
RasSetEntryProperties(NULL, "pppoe", &rasentry, sizeof(rasentry), 0, 0);
错误:
..\dd\mainwindow.cpp: In constructor 'MainWindow::MainWindow(QWidget*)':
..\dd\mainwindow.cpp:26: error: cannot convert 'WCHAR*' to 'char*' for argument '1' to 'char* strcpy(char*, const char*)'
..\dd\mainwindow.cpp:27: error: 'RASDT_PPPoE' was not declared in this scope
..\dd\mainwindow.cpp:28: error: cannot convert 'const char*' to 'const WCHAR*' for argument '1' to 'DWORD RasSetEntryPropertiesW(const WCHAR*, const WCHAR*, tagRASENTRYW*, DWORD, BYTE*, DWORD)'
请大家帮帮忙。