a,b,c都是指针,没有分配内存,怎么可以存数据呢
参数也传的不对
参数也传的不对
解决方案 »
- 按MSDN提供的方法ToolTip只对按钮有效?
- OnMouseMove(UINT nFlags, CPoint point)???
- 有没有开放源代码的ftp软件(客户端)?,哪里有下载?
- 通过IHTMLWindow2怎么改变嵌入在程序中IE窗体滚动条的位置?
- 关于链表的基本操作,请大家帮忙看看提点意见,小弟是菜鸟,一个错误5分(分有限呵呵)
- AfxBeginThread()函数调用出现问题。
- 如何制作一个目录选择对话框?
- VS2005 media player activeX求指导
- 请问改变字体颜色..
- 重载函数如何返回?
- 怎样执行外部命令,如del c:\test\*.* 。
- 哪里找的到VHDL语言的高手?
b=....
c=....用完后再free(..)就行了!
* read a UINT from the profile, or return default if
* not found.
*/
UINT mmGetProfileInt( LPCTSTR pstrAppName, LPCTSTR pstrValueName, UINT uDefault )
{
CString strName;
HKEY hkey;
DWORD dwType;
UINT value = uDefault;
DWORD dwData;
DWORD cbData; strName.Format( _T("%s%s"), KEYNAME, pstrAppName );
if( RegOpenKey( ROOTKEY, strName, &hkey ) != ERROR_SUCCESS )
return(uDefault); cbData = sizeof(dwData);
if( RegQueryValueEx(
hkey,
_T("Space"),
NULL,
&dwType,
(PBYTE) &dwData,
&cbData) == ERROR_SUCCESS )
{
if( dwType == REG_DWORD )
value = (UINT)dwData;
} RegCloseKey(hkey); return(value);
}/*
* write a UINT to the profile, if it is not the
* same as the default or the value already there
*/
VOID mmWriteProfileInt( LPCTSTR pstrAppName, LPCTSTR pstrValueName, UINT uValue, UINT uDefault )
{
CString strName;
HKEY hkey;
DWORD dwData = uValue;
if( mmGetProfileInt( pstrAppName, pstrValueName, uDefault ) == uValue )
return;
strName.Format( _T("%s%s"), KEYNAME, pstrAppName );
if( RegCreateKey( ROOTKEY, strName, &hkey ) == ERROR_SUCCESS )
{
RegSetValueEx(
hkey,
pstrValueName,
0,
REG_DWORD,
(PBYTE) &dwData,
sizeof(dwData)
);
RegCloseKey(hkey);
}
}