非常急的问题!!!!!!(100分)

  • 主题发起人 主题发起人 guoyuzhang
  • 开始时间 开始时间
G

guoyuzhang

Unregistered / Unconfirmed
GUEST, unregistred user!
各位大侠,请诊断下面的代码:为什么我建立不了拨号连接?procedure TPzBhwlFrm.BitBtn1Click(Sender: TObject);
var
entry: TRasEntry;
begin
FillChar(entry, SizeOf(TRasEntry), 0);
entry.dwSize := SizeOf(TRasEntry);
set_entry_params(entry);
if RasSetEntryProperties(nil, PChar('connection'),
@entry, SizeOf(TRasEntry), nil, 0) = 0 then
begin
ShowMessage('拨号网络连接创建成功,请您按下一步按钮!');
BitBtn3.Enabled := True;
end
else
ShowMessage('拨号网络连接创建失败!')

procedure TPzBhwlFrm.set_entry_params(var entry: TRasEntry);
var
devicename: string;
begin
entry.dwfOptions := entry.dwfOptions and (not RASEO_UseCountryAndAreaCodes);
entry.dwfOptions := entry.dwfOptions and (not RASEO_SpecificIpAddr);
entry.dwfOptions := entry.dwfOptions and (not RASEO_SpecificNameServers);
entry.dwfOptions := entry.dwfOptions and (not RASEO_IpHeaderCompression);
entry.dwfOptions := entry.dwfOptions and (not RASEO_RemoteDefaultGateway);
entry.dwfOptions := entry.dwfOptions and (not RASEO_DisableLcpExtensions);
entry.dwfOptions := entry.dwfOptions and (not RASEO_TerminalBeforeDial);
entry.dwfOptions := entry.dwfOptions and (not RASEO_TerminalAfterDial);
entry.dwfOptions := entry.dwfOptions and (not RASEO_ModemLights);
entry.dwfOptions := entry.dwfOptions and (not RASEO_SwCompression);
entry.dwfOptions := entry.dwfOptions and (not RASEO_RequireEncryptedPw);
entry.dwfOptions := entry.dwfOptions and (not RASEO_RequireMsEncryptedPw);
entry.dwfOptions := entry.dwfOptions and (not RASEO_RequireDataEncryption);
entry.dwfOptions := entry.dwfOptions and (not RASEO_NetworkLogon);
entry.dwfOptions := entry.dwfOptions and (not RASEO_UseLogonCredentials);
entry.dwfOptions := entry.dwfOptions and (not RASEO_PromoteAlternates);
entry.dwfNetProtocols := entry.dwfNetProtocols and (not RASNP_Netbeui);
entry.dwfNetProtocols := entry.dwfNetProtocols and (not RASNP_Ipx);
entry.dwFramingProtocol := 1 ;
StrPCopy(entry.szScript, pchar(''));
devicename :=PzModemFrm.cboDevice.Text;
StrPCopy(entry.szLocalPhoneNumber, Pchar('163'));
StrPCopy(entry.szDeviceName, devicename);
StrPCopy(entry.szDeviceType, PzModemFrm.cboDevice.Items.Values[devicename]);

 
接受答案了.
 
后退
顶部