Gerry,
The 12 comes from the 3 longs which are 4 bytes each. I built it like that so I didn't have to stuff a dummy 4 byte 0 in for the length and then replace it with the real length.
>Why did you add 12 to length of cTchar and why did you take the length of the structure before adding values for nSubEntry & nCallbackID.
>>cEntryName = padl( "SomeName", RAS_MaxEntryName ) + chr(0)
>>cPhoneNumber = padl( "8008001234", RAS_MaxPhoneNumber ) + chr(0)
>>...
>>cTchar = cEntryName + cPhoneNumber + ...
>>nSubEntry = 0
>>nCallBackId = 0
>>cRASDIALPARAMS = ToLong( len( cTchar ) + 12 ) + cTchar + ToLong( nSubEntry ) + ToLong( nCallbackId )
>>
>>n = SomeRASFunction( ..., @cRASDIALPARAMS, ... )