This below code doesn't work ! ... lea edi,bufentry push SIZEOF RASENTRYNAMEA ;** wrong ** pop (RASENTRYNAMEA PTR ).dwSize invoke RasEnumEntries,NULL,NULL,ADDR bufentry,ADDR lpcb,ADDR lpcEntries ... ----------------- If I replace : - push 108h ;==> This code works well !!! for - push SIZEOF RASENTRYNAMEA ; ; When I debugged this command, I saw it is changed ; to "push 105h". It means SIZEOF RASENTRYNAMEA = 105h Do anyone know what wrong it is here ?
Posted on 2001-01-13 21:09:00 by asmbeginner
RAS_MaxEntryName EQU 256 RASENTRYNAMEA STRUCT dwSize dd ? szEntryName db RAS_MaxEntryName + 1 dup(?) RASENTRYNAMEA ENDS This means SIZEOF RASENTRYNAMEA is 4 + 256 + 1 = 261 ==> 105H So... what doesn't 'work'?
Posted on 2001-01-14 01:24:00 by Ernie
Are you trying to run on Win2k? There's apparently two extra fields needed in RASENTRYNAME for it. typedef struct _RASENTRYNAME { DWORD dwSize; TCHAR szEntryName; #if (WINVER >= 0x500) DWORD dwFlags; CHAR szPhonebookPath; #endif } RASENTRYNAME; Check the return code of RasEnumEntries.
Posted on 2001-01-14 03:04:00 by tank
; dw_Size parameter of the RASDIALPARAMS structure is 041Ch, not 0419h !? ; dw_Size parameter of the RASENTRYNAME structure is 0108h, not 0105h !? ; dw_Size parameter of the RASCONN structure is 019Ch, not 019Bh !? ; dw_Size parameter of the RASCONNSTATUS structure is 00A0h, not 009Eh !? Currently I don't know why, but that's the way it works. Test
Posted on 2001-01-14 05:25:00 by Test Department
Thanks all ! Finally, I knew what wrong ! If I declare the structure like this : RASENTRYNAMEA STRUCT DWORD dwSize dd ? szEntryName db RAS_MaxEntryName + 1 dup(?) RASENTRYNAMEA END It works well ! Because RAS Functions require DWORD boundary to align this structrue. Sorry for my bad english.
Posted on 2001-01-15 01:00:00 by asmbeginner