Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

59 lines
2.3 KiB

//-----------------------------------------------------------------------------
// RNAAPI class
//
// This class provides a series of cover function for the RNAPH/RASAPI32 dlls
//
// Created 1-29-96 ChrisK
//-----------------------------------------------------------------------------
// TYPEDEF
typedef DWORD (WINAPI* PFNRASENUMDEVICES)(LPRASDEVINFO lpRasDevInfo, LPDWORD lpcb, LPDWORD lpcDevices);
typedef DWORD (WINAPI* PFNRASVALIDATEENTRYNAE)(LPTSTR lpszPhonebook, LPTSTR lpszEntry);
typedef DWORD (WINAPI* PFNRASSETENTRYPROPERTIES)(LPTSTR lpszPhonebook, LPTSTR lpszEntry, LPBYTE lpbEntryInfo, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo, DWORD dwDeviceInfoSize);
typedef DWORD (WINAPI* PFNRASGETENTRYPROPERTIES)(LPTSTR lpszPhonebook, LPTSTR lpszEntry, LPBYTE lpbEntryInfo, LPDWORD lpdwEntryInfoSize, LPBYTE lpbDeviceInfo, LPDWORD lpdwDeviceInfoSize);
//-----------------------------------------------------------------------------
// CLASS
// ############################################################################
class CRNAAPI
{
public:
void far * operator new( size_t cb ) { return GlobalAlloc(GPTR,cb); };
void operator delete( void far * p ) {GlobalFree(p); };
CRNAAPI();
~CRNAAPI();
DWORD RasEnumDevices(LPRASDEVINFO, LPDWORD, LPDWORD);
DWORD RasValidateEntryName(LPTSTR,LPTSTR);
DWORD RasSetEntryProperties(LPTSTR lpszPhonebook, LPTSTR lpszEntry,
LPBYTE lpbEntryInfo, DWORD dwEntryInfoSize,
LPBYTE lpbDeviceInfo, DWORD dwDeviceInfoSize);
DWORD RasGetEntryProperties(LPTSTR lpszPhonebook, LPTSTR lpszEntry,
LPBYTE lpbEntryInfo, LPDWORD lpdwEntryInfoSize,
LPBYTE lpbDeviceInfo, LPDWORD lpdwDeviceInfoSize);
private:
BOOL LoadApi(LPSTR, FARPROC*);
HINSTANCE m_hInst;
HINSTANCE m_hInst2;
PFNRASENUMDEVICES m_fnRasEnumDeviecs;
PFNRASVALIDATEENTRYNAE m_fnRasValidateEntryName;
PFNRASSETENTRYPROPERTIES m_fnRasSetEntryProperties;
PFNRASGETENTRYPROPERTIES m_fnRasGetEntryProperties;
};
#ifndef WIN16
inline BOOL IsNT(void)
{
OSVERSIONINFO OsVersionInfo;
ZeroMemory(&OsVersionInfo, sizeof(OSVERSIONINFO));
OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&OsVersionInfo);
return (VER_PLATFORM_WIN32_NT == OsVersionInfo.dwPlatformId);
}
#endif