WriteProfileString 这个函数把内容写到哪里了?(50分)

  • 主题发起人 主题发起人 delhpi
  • 开始时间 开始时间
D

delhpi

Unregistered / Unconfirmed
GUEST, unregistred user!
Printer.PrinterIndex := ComboBox1.ItemIndex;
Printer.GetPrinter (Device, Driver, Port, hDeviceMode);
StrCopy (s, Device);
StrCat (s, ',');
StrCat (s, Driver);
StrCat (s, ',');
StrCat (s, Port);
WriteProfileString ('windows', 'device', s);
showmessage(s);
StrCopy (s, 'windows');
SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, LongInt(@s));

好像都说是 win.ini里,我怎么看不到啊
 
Windows NT:

Windows NT maps most .INI file references to the registry, using the mapping defined under the following registry key:

HKEY_LOCAL_MACHINE/Software/Microsoft/
Windows NT/CurrentVersion/IniFileMapping
When the operation has been mapped, the WriteProfileString function writes information to the registry, not to the initialization file; the change in the storage location has no effect on the function's behavior.

默认的情况下,WriteProfileString 对 WIN.INI 的写操作是写在注册表里面的。
 
注册表里是有这个键,看到WIN.INI了。但
WriteProfileString ('windows', 'device', s);
看不到什么内容啊。s应该是一个打印机的名称。
 
写到这里了
HKEY_CURRENT_USER/Software/Microsoft/Windows NT/CurrentVersion/Windows
 
接受答案了.
 
后退
顶部