RAS-API Failure? Always changes the Attribute "AuthRestrictions"

I use the RAS-API (rasapi32.dll => => XP SP2) to get the Data from a Phonebook and Write the Data to this.

In the Case I change NO Attribute in the Phonebook the Attribute "AuthRestrictions" changes von 632 to 888.

Does anybody know a solution?

We are using this vb-code:
==================

Dim rtn As Long, lngCb As Long, lngBuffLen As Long
Dim b() As Byte
Dim lngPos As Long, lngStrLen As Long

rtn = RasGetEntryProperties(vbNullString, vbNullString, _
ByVal 0&, lngCb, ByVal 0&, ByVal 0&)

rtn = RasGetEntryProperties("MyPhonebook", "MyModemEntry", _
ByVal 0&, lngBuffLen, ByVal 0&, ByVal 0&)


ReDim b(lngBuffLen - 1)
CopyMemory b(0), lngCb, 4

rtn = RasGetEntryProperties("MyPhonebook", "MyModemEntry", _
b(0), lngBuffLen, ByVal 0&, ByVal 0&)

rtn = RasSetEntryProperties("MyPhonebook", "MyModemEntry", _
b(0), lngBuffLen, ByVal 0&, ByVal 0&)

The Phonebook-File:
=============

[P800]
Encoding=1
Type=1
AutoLogon=0
UseRasCredentials=1
DialParamsUID=740394
Guid=D5E898D15A6A5646B9805609EE0F7F43
BaseProtocol=1
VpnStrategy=0
ExcludedProtocols=3
LcpExtensions=1
DataEncryption=8
SwCompression=1
NegotiateMultilinkAlways=0
SkipNwcWarning=0
SkipDownLevelDialog=0
SkipDoubleDialDialog=0
DialMode=1
DialPercent=75
DialSeconds=120
HangUpPercent=10
HangUpSeconds=120
OverridePref=15
RedialAttempts=99
RedialSeconds=5
IdleDisconnectSeconds=0
RedialOnLinkFailure=1
CallbackMode=0
CustomDialDll=
CustomDialFunc=
CustomRasDialDll=
AuthenticateServer=0
ShareMsFilePrint=0
BindMsNetClient=0
SharedPhoneNumbers=1
GlobalDeviceSettings=0
PrerequisiteEntry=
PrerequisitePbk=
PreferredPort=COM1
PreferredDevice=Sony Ericsson P800 IR Modem
PreferredBps=115200
PreferredHwFlow=1
PreferredProtocol=0
PreferredCompression=1
PreferredSpeaker=0
PreferredMdmProtocol=0
PreviewUserPw=1
PreviewDomain=0
PreviewPhoneNumber=1
ShowDialingProgress=1
ShowMonitorIconInTaskBar=1
CustomAuthKey=-1
AuthRestrictions=632
TypicalAuth=1
IpPrioritizeRemote=1
IpHeaderCompression=1
IpAddress=0.0.0.0
IpDnsAddress=0.0.0.0
IpDns2Address=0.0.0.0
IpWinsAddress=0.0.0.0
IpWins2Address=0.0.0.0
IpAssign=1
IpNameAssign=1
IpFrameSize=1006
IpDnsFlags=0
IpNBTFlags=0
TcpWindowSize=0
UseFlags=1
IpSecFlags=0
IpDnsSuffix=

NETCOMPONENTS=
ms_server=0
ms_msclient=0
ms_psched=1

MEDIA=serial
Port=COM1
Device=Sony Ericsson P800 IR Modem
ConnectBPS=115200

DEVICE=modem
PhoneNumber=*98*1#
AreaCode=
CountryCode=1
CountryID=1
UseDialingRules=0
Comment=
LastSelectedPhone=0
PromoteAlternates=0
TryNextAlternateOnFail=0
HwFlowControl=1
Protocol=0
Compression=1
Speaker=0
MdmProtocol=0

[Belgacom]
Encoding=1
Type=1
AutoLogon=0
UseRasCredentials=1
DialParamsUID=138899
Guid=ECB7F31CE1F4A443962BC91192536E00
BaseProtocol=1
VpnStrategy=0
ExcludedProtocols=3
LcpExtensions=1
DataEncryption=8
SwCompression=1
NegotiateMultilinkAlways=0
SkipNwcWarning=0
SkipDownLevelDialog=0
SkipDoubleDialDialog=0
DialMode=1
DialPercent=75
DialSeconds=120
HangUpPercent=10
HangUpSeconds=120
OverridePref=15
RedialAttempts=99
RedialSeconds=5
IdleDisconnectSeconds=0
RedialOnLinkFailure=1
CallbackMode=0
CustomDialDll=
CustomDialFunc=
CustomRasDialDll=
AuthenticateServer=0
ShareMsFilePrint=0
BindMsNetClient=0
SharedPhoneNumbers=1
GlobalDeviceSettings=0
PrerequisiteEntry=
PrerequisitePbk=
PreferredPort=COM3
PreferredDevice=Conexant 56K ACLink Modem
PreferredBps=115200
PreferredHwFlow=1
PreferredProtocol=1
PreferredCompression=1
PreferredSpeaker=1
PreferredMdmProtocol=0
PreviewUserPw=1
PreviewDomain=0
PreviewPhoneNumber=1
ShowDialingProgress=1
ShowMonitorIconInTaskBar=1
CustomAuthKey=-1
AuthRestrictions=632
TypicalAuth=1
IpPrioritizeRemote=1
IpHeaderCompression=1
IpAddress=0.0.0.0
IpDnsAddress=0.0.0.0
IpDns2Address=0.0.0.0
IpWinsAddress=0.0.0.0
IpWins2Address=0.0.0.0
IpAssign=1
IpNameAssign=1
IpFrameSize=1006
IpDnsFlags=0
IpNBTFlags=0
TcpWindowSize=0
UseFlags=1
IpSecFlags=0
IpDnsSuffix=

NETCOMPONENTS=
ms_server=0
ms_msclient=0
ms_psched=1

MEDIA=serial
Port=COM3
Device=Conexant 56K ACLink Modem
ConnectBPS=115200

DEVICE=modem
PhoneNumber=090934100
AreaCode=
CountryCode=1
CountryID=1
UseDialingRules=0
Comment=
LastSelectedPhone=0
PromoteAlternates=0
TryNextAlternateOnFail=1
HwFlowControl=1
Protocol=1
Compression=1
Speaker=1
MdmProtocol=0

[Arnes]
Encoding=1
Type=1
AutoLogon=0
UseRasCredentials=1
DialParamsUID=637576
Guid=0A924CDA0F03054BB7058C75811F95EE
BaseProtocol=1
VpnStrategy=0
ExcludedProtocols=3
LcpExtensions=1
DataEncryption=8
SwCompression=1
NegotiateMultilinkAlways=0
SkipNwcWarning=0
SkipDownLevelDialog=0
SkipDoubleDialDialog=0
DialMode=1
DialPercent=75
DialSeconds=120
HangUpPercent=10
HangUpSeconds=120
OverridePref=15
RedialAttempts=99
RedialSeconds=5
IdleDisconnectSeconds=0
RedialOnLinkFailure=1
CallbackMode=0
CustomDialDll=
CustomDialFunc=
CustomRasDialDll=
AuthenticateServer=0
ShareMsFilePrint=0
BindMsNetClient=0
SharedPhoneNumbers=1
GlobalDeviceSettings=0
PrerequisiteEntry=
PrerequisitePbk=
PreferredPort=COM3
PreferredDevice=Conexant 56K ACLink Modem
PreferredBps=115200
PreferredHwFlow=1
PreferredProtocol=1
PreferredCompression=1
PreferredSpeaker=1
PreferredMdmProtocol=0
PreviewUserPw=1
PreviewDomain=0
PreviewPhoneNumber=1
ShowDialingProgress=1
ShowMonitorIconInTaskBar=1
CustomAuthKey=-1
AuthRestrictions=632
TypicalAuth=1
IpPrioritizeRemote=1
IpHeaderCompression=1
IpAddress=0.0.0.0
IpDnsAddress=193.2.1.66
IpDns2Address=193.2.1.72
IpWinsAddress=0.0.0.0
IpWins2Address=0.0.0.0
IpAssign=1
IpNameAssign=2
IpFrameSize=0
IpDnsFlags=0
IpNBTFlags=0
TcpWindowSize=0
UseFlags=1
IpSecFlags=0
IpDnsSuffix=

NETCOMPONENTS=
ms_server=0
ms_msclient=0
ms_psched=1

MEDIA=serial
Port=COM3
Device=Conexant 56K ACLink Modem
ConnectBPS=115200

DEVICE=modem
PhoneNumber=088932330
AreaCode=
CountryCode=386
CountryID=386
UseDialingRules=0
Comment=
PhoneNumber=088932330
AreaCode=
CountryCode=386
CountryID=386
UseDialingRules=0
Comment=
LastSelectedPhone=0
PromoteAlternates=1
TryNextAlternateOnFail=1
HwFlowControl=1
Protocol=1
Compression=1
Speaker=1
MdmProtocol=0

[7426 byte] By [Pille] at [2007-12-16]