关于“WritePrivateProfileStruct”在Windows advance Server 上写.ini文件不能成功,请大侠们出手帮忙。

laolou_1983 2007-12-06 10:52:29
调用GetLastError,返回120,显示系统不支持该功能,2000上应该支持该函数吧,请大侠们指教,100分请笑纳!
...全文
141 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
laolou_1983 2007-12-06
  • 打赏
  • 举报
回复
果然是那个文件只读的原因,谢谢各位大侠的帮助。
接分啦。。。。。哈哈哈
feng1976 2007-12-06
  • 打赏
  • 举报
回复
可能是楼上说得
wjkgz 2007-12-06
  • 打赏
  • 举报
回复
是不是文件是只读的,或者包含文件的文件夹是只读的。
laolou_1983 2007-12-06
  • 打赏
  • 举报
回复
感谢大家的积极响应,多谢!
同样的代码,同样的可执行程序可以在另外一台2000 advanced Server 上正常运行,因此调用参数方面应该是没有问题的,但奇怪就奇怪在,有一台2000 advanced Server不能正确运行,所有的WritePrivateProfileStruct,WritePrivateProfileString都不能调用成功,那个.ini文件是存在的。疑难杂症啊,谢谢大家的帮忙。
lwg7603 2007-12-06
  • 打赏
  • 举报
回复
Windows Server 2003, Windows XP/2000: The system keeps a cached version of the most recent registry file mapping to improve performance. If all the value of all of the parameters are NULL, the function flushes the cache.
wjkgz 2007-12-06
  • 打赏
  • 举报
回复
Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, and Windows 95.
Server: Included in Windows Server 2003, Windows 2000 Server, and Windows NT Server.
Unicode: Implemented as Unicode and ANSI versions. Note that Unicode support on Windows Me/98/95 requires Microsoft Layer for Unicode.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.


2000上应该是可以的
把你调用的语句发上来
zhoujianhei 2007-12-06
  • 打赏
  • 举报
回复
Note This function is provided only for compatibility with 16-bit versions of Windows.
zhoujianhei 2007-12-06
  • 打赏
  • 举报
回复
查看一下参数是否正确。
Creating Windows CreateMDIWindow CreateWindow CreateWindowEx RegisterClass RegisterClassEx UnregisterClass Message Processing BroadcastSystemMessage CallNextHookEx CallWindowProc DefFrameProc DefMDIChildProc DefWindowProc DispatchMessage GetMessage GetMessageExtraInfo GetMessagePos GetMessageTime GetQueueStatus InSendMessage PeekMessage PostMessage PostQuitMessage PostThreadMessage RegisterWindowMessage ReplyMessage SendMessage SendMessageCallback SendMessageTimeout SendNotifyMessage SetMessageExtraInfo SetWindowsHookEx TranslateMessage UnhookWindowsHookEx WaitMessage Window Information AnyPopup ChildWindowFromPoint ChildWindowFromPointEx EnableWindow EnumChildWindows EnumPropsEx EnumThreadWindows EnumWindows FindWindow FindWindowEx GetClassInfoEx GetClassLong GetClassName GetClientRect GetDesktopWindow GetFocus GetForegroundWindow GetNextWindow GetParent GetProp GetTopWindow GetWindow GetWindowLong GetWindowRect GetWindowText GetWindowTextLength IsChild IsIconic IsWindow IsWindowEnabled IsWindowUnicode IsWindowVisible IsZoomed RemoveProp SetActiveWindow SetClassLong SetFocus SetForegroundWindow SetParent SetProp SetWindowLong SetWindowText WindowFromPoint Processes and Threads CreateEvent CreateMutex CreateProcess CreateSemaphore CreateThread DeleteCriticalSection DuplicateHandle EnterCriticalSection ExitProcess ExitThread GetCurrentProcess GetCurrentProcessId GetCurrentThread GetCurrentThreadId GetExitCodeProcess GetExitCodeThread GetPriorityClass GetThreadPriority GetWindowThreadProcessId InitializeCriticalSection InterlockedDecrement InterlockedExchange InterlockedIncrement LeaveCriticalSection OpenEvent OpenMutex OpenProcess OpenSemaphore PulseEvent ReleaseMutex ReleaseSemaphore ResetEvent ResumeThread SetEvent SetPr

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

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