
01.08.2011, 11:54
|
 |
Let Me Show You
|
|
Регистрация: 30.04.2010
Адрес: Северодвинск
Сообщения: 5,426
Версия Delphi: 7, XE5
Репутация: 59586
|
|
WM_DEVICECHANGE это не функция, а сообщение:
Цитата:
WM_DEVICECHANGE Message
Notifies an application of a change to the hardware configuration of a device or the computer.
|
http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx
примерчик:
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
ListBox1: TListBox;
private
{ Private declarations }
public
{ Public declarations }
procedure WMDEVICECHANGE(var Msg: TMessage); message WM_DEVICECHANGE;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.WMDEVICECHANGE(var Msg: TMessage);
begin
ListBox1.Items.Add('WParam='+IntToStr(Msg.WParam)+' LParam='+IntToStr(Msg.LParam));
end;
end.
на флешку реагирует и без администраторских прав.
__________________
Пишу программы за еду.
__________________
|