| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 462 人关注过本帖
标题:问题,请指教
只看楼主 加入收藏
tiantianniha
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2007-5-16
收藏
 问题点数:0 回复次数:0 
问题,请指教

感谢楼主上次的及时答复,问题已得到很好的解决。


现在编程时又遇到这样的问题,实不知是哪方面出错了?望请指教。

代码如下:
uint16 str[20] = {0};
uint16 Length = 0;
if(open_ps(1,0)) (注:open_ps()与read_ps()二函数是产品中的内部函数)
{
if(read_ps(706,str,15,&Length))
{
showver.Format("%4x%4x%4x%4x%4x%4x%4x%4x%4x%4x%4x%4x%4x%4x%4x",str[0],str[1],str[2],str[3],str[4],str[5],str[6],str[7],str[8],str[9],str[10],str[11],str[12],str[13],str[14]);
::SetWindowText(::GetDlgItem(AfxGetMainWnd()->m_hWnd,IDC_EDIT1),showver);
}
else
{
AfxMessageBox("读取键失败");
}

}
else
{
AfxMessageBox("打开键失败");
}
调试后,显示错误信息:

error LNK2001: unresolved external symbol _read_ps@16
error LNK2001: unresolved external symbol _open_ps@8
Debug/E0715.exe: fatal error LNK1120:2 unresolved externals

我把数组str的声明改为uint32 str[15]={0};调试后结果仅有一个错误出现:

error C2664:"read_ps":cannot convert parameter 2 from "unsigned int[15]" to "unsigned short *const"types

pointed to are unrelated;conversion requires reinterpret_cast , C-Style cast or function-style cast.



注:函数open_ps()与read_ps()均是产品中的内部函数,执行一定的功能:

(1)open_ps()是完成打开ps键的功能。

(2)read_ps(const unsigned short key,unsigned short *const data,const unsigned short maxlen,unsigned short *const len)
parameters: key-->the ps key entry id
data-->pointed to array to recieve the ps data to be read
maxlen-->the size of the data array
len-->the acrual size of the read key
function: the function is used to write to the persistent store.

搜索更多相关主题的帖子: 指教 
2007-05-21 19:46
快速回复:问题,请指教
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014057 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved