P
PLWang
Unregistered / Unconfirmed
GUEST, unregistred user!
implementation
{$R *.dfm}
function RasDial(pRasDialExtensions:LPRASDIALEXTENSIONS; lpszPhonebookChar;
lpRasDialParams:LPRASDIALPARAMS; dwNotifierTypeWORD; handle:TRasDialFunc;
var lphRasConnWORD) : DWORD; stdcall; external 'Rasapi32.dll';
procedure TForm1.Button1Click(Sender: TObject);
var
RASDIALPARAMSData : RASDIALPARAMS;
dwResult, dwRasCon, : DWORD;
begin
ZeroMemory(@RASDIALPARAMSData, sizeof(RASDIALPARAMS));
With RASDIALPARAMSData do
begin
dwSize := sizeof(RASDIALPARAMS);
szEntryName := '193';
szUserName := '';
szPassword := '';
szPhoneNumber := '';
end;
dwResult := RasDial(NIL, NIL, @RASDIALPARAMSData, 0, NIL, dwRasCon);
if dwResult<>0 then ...
编译时总是Undeclare identifier: "RASDIALPARAMS" ... "LPRASDIALEXTENSIONS" 之类
还需要引用哪个单元文件吗? 请教
{$R *.dfm}
function RasDial(pRasDialExtensions:LPRASDIALEXTENSIONS; lpszPhonebookChar;
lpRasDialParams:LPRASDIALPARAMS; dwNotifierTypeWORD; handle:TRasDialFunc;
var lphRasConnWORD) : DWORD; stdcall; external 'Rasapi32.dll';
procedure TForm1.Button1Click(Sender: TObject);
var
RASDIALPARAMSData : RASDIALPARAMS;
dwResult, dwRasCon, : DWORD;
begin
ZeroMemory(@RASDIALPARAMSData, sizeof(RASDIALPARAMS));
With RASDIALPARAMSData do
begin
dwSize := sizeof(RASDIALPARAMS);
szEntryName := '193';
szUserName := '';
szPassword := '';
szPhoneNumber := '';
end;
dwResult := RasDial(NIL, NIL, @RASDIALPARAMSData, 0, NIL, dwRasCon);
if dwResult<>0 then ...
编译时总是Undeclare identifier: "RASDIALPARAMS" ... "LPRASDIALEXTENSIONS" 之类
还需要引用哪个单元文件吗? 请教