主题:delphi怎么实现编码安装驱动?使用newdev.dll
代码段如下:我在c#里通过了 但是改成delphi就不行了
function UpdateDriverForPlugAndPlayDevices(hwndParent: HWND; HardwareId, FullInfPath: PChar; InstallFlags: Integer): Boolean; stdcall;
external 'C:\WINDOWS\system32\newdev.dll' name 'UpdateDriverForPlugAndPlayDevicesA';
procedure TForm1.Button5Click(Sender: TObject);
begin
UpdateDriverForPlugAndPlayDevices(0, 'HDAUDIO\\FUNC_01&VEN_10EC&DEV_0862', 'D:\Realtek High Definition Audio\oem0.inf', 1);
end;
function UpdateDriverForPlugAndPlayDevices(hwndParent: HWND; HardwareId, FullInfPath: PChar; InstallFlags: Integer): Boolean; stdcall;
external 'C:\WINDOWS\system32\newdev.dll' name 'UpdateDriverForPlugAndPlayDevicesA';
procedure TForm1.Button5Click(Sender: TObject);
begin
UpdateDriverForPlugAndPlayDevices(0, 'HDAUDIO\\FUNC_01&VEN_10EC&DEV_0862', 'D:\Realtek High Definition Audio\oem0.inf', 1);
end;