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)'


请大家帮帮忙。
...全文
123 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
tmh 2012-06-27
  • 打赏
  • 举报
回复
好的谢谢
xiebin133 2012-06-27
  • 打赏
  • 举报
回复
做一下强转看一下。
tubo_true 2012-06-27
  • 打赏
  • 举报
回复
.\dd\mainwindow.cpp:26: error: cannot convert 'WCHAR*' to 'char*' for argument '1' to 'char* strcpy(char*, const char*)'

字符转换问题

16,224

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧