阅读:2865回复:7
cstring filename 的字符串如何放到ULONG buf[256]数组里
我想在应用程序中使用
readfile 或者 writefile 函数发像驱动程序发一个 数组 ,这个数组 ULONG buf[256] 我想把一个 cstring filename 的字符串放到这个数组里 使用strcopy 函数不行,请问如何,为readfile 或者 writefile 准备发送的数据还有其他方法吗 |
|
最新喜欢:![]()
|
沙发#
发布于:2005-04-22 10:06
strcpy( (char *)buf, LPCTSTR( filename ) );
strcopy是不行,因为没有这个函数。 [编辑 - 4/22/05 by maqian] |
|
|
板凳#
发布于:2005-04-22 10:26
yjx2003,我问你,为什么要用ULONG,你发送的数据不是字符(char)类型吗?改成char buf[256]比较好。
|
|
|
地板#
发布于:2007-06-07 10:53
你要是不怕麻烦,那就用for循环啊.
用CSring::GetAt(n) 把字符串中的字符一个一个取出来,你愿意怎么出来就怎么处理喽 |
|
地下室#
发布于:2007-08-10 16:08
char buf[256];
sprintf(&buf,"%c",filename); |
|
禁止发言
![]() |
5楼#
发布于:2007-09-13 10:46
用户被禁言,该主题自动屏蔽! |
6楼#
发布于:2007-09-13 12:17
char buf[256];
sprintf(&buf,"%c",filename); 这个应该可以实现 |
|
|
7楼#
发布于:2008-01-14 21:20
引用第6楼wyq521003于2007-09-13 12:17发表的 : 应该为 char buf[256]; sprintf(buf,"%s",filename); |
|