亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rnaapp.c

?? wince3.0的源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************
Copyright (c) 1995-2000 Microsoft Corporation.  All rights reserved.

RnaApp.c : Remote networking worker program

	@doc EX_RNAAPP

	@topic     RNAApp |
		This program is used to create and maintain a RAS connection.


	NOTE: This is an internal program used by the Remote Networking application.
	Its' command line parameters and existance in Windows CE may change from release
	to release as we add more features or change internal architecture of the components.
		
	The RNAApp.exe program will attempt to create a RAS connection. This
	is a worker app used by RemNet and tends to change with every release.
	In general apps should use RasDial() themselves so they they can maintain
	their own state

	Usage:
	RNAAPP [-n -p -m -cNUM] -eENTRYNAME

	Option		Description
	-n			Disables most error message boxes, used when calling
				application will display the error values
	-p			By default it will prompt for username/password for
				dial-up entries, if this is specified it will skip the initial
				prompt
	-m			Minimize on connection.
	-cNUM		Set the context value to NUM (this should be a HEX value,
				eg. -c54AF)
	-eENTRYNAME	The name of the RASEntry to use.  If the name contains any
				embedded spaces then this should be enclosed in double quotes.

	Examples:
	rnaapp -m -eDirect
	rnaapp -e"Name with spaces"


	RNAApp will send a broadcast message to all applications when a
	connection succeeds (or fails).  This broadcast message is sent as follows:

	
	SendNotifyMessage( HWND_BROADCAST, WM_NETCONNECT, (WPARAM)TRUE,
		(LPARAM)&v_RNAAppInfo );

	The wParam of the message is a boolean that indicates either connection
	success (TRUE) or termination of the connection (FALSE).	

	The lParam of the message is a pointer to the following structure
	(defined in ras.h):
	
	typedef struct tagRNAAppInfo {
		DWORD	dwSize;					// The size of this structure
		DWORD	hWndRNAApp;				// The handle of the RNAApp window
		DWORD	Context;				// Context value specified on CmdLine
		DWORD	ErrorCode;				// Last error code
		TCHAR	RasEntryName[RAS_MaxEntryName+1];
	} RNAAPP_INFO, *PRNAAPP_INFO;

	The structure elements are defined as follows:

	dwSize		Size of the structure, to be certain of tracking version
				changes you should compare this against the
				sizeof(RNAAPP_INFO).
	hWndRNAApp	The window handle of the RNAApp program (see below).
	Context		The context specified on the command line.
	ErrorCode	The error code (only valid if wParam == FALSE). See below for
				the list of error codes.
	RasEntryName The RAS entry name specified on the command line.

	Error Codes (defined in raserror.h)
	ERROR_PORT_NOT_AVAILABLE
		Port was not available.
	ERROR_PORT_DISCONNECTED
		After sucessfully connecting the port was disconnected.
	ERROR_NO_CARRIER
		No carrier was detected by the modem.
	ERROR_NO_DIALTONE
		No dialtone was detected by the modem (not all modems support this).
	ERROR_DEVICE_NOT_READY
		The device is not ready (for PCMCIA modems the device might not be
		inserted).
	ERROR_LINE_BUSY
		The modem detected a busy signal.
	ERROR_NO_ANSWER
		No one answered the phone
	ERROR_POWER_OFF
		The serial device returned indication that power had been turned off.
	ERROR_POWER_OFF_CD
		The serial device returned indication that power had been turned off,
		and that Carrier Detect was currently asserted.  This is an indication
		that we are still in the docking station.
	ERROR_USER_DISCONNECTION
		The user has disconnected the connection (by pressing the
		disconnect/cancel button)
	ERROR_DISCONNECTION
		Disconnected for an unknow reason.
	ERROR_INVALID_PARAMETER
		Invalid or missing parameter.  The -e parameter is required.
	ERROR_STATE_MACHINES_ALREADY_STARTED
		The system cannot establish another RAS connection
	ERROR_CANNOT_FIND_PHONEBOOK_ENTRY
		Unable to find specified RAS entry.
	ERROR_EVENT_INVALID
		Internal error.
				

	Sending messages to the RNAApp.
		The calling application can send messages to RNAApp.  These should
		be sent in the form:
		
		SendMessage (hWnd, RNA_RASCMD, <CMD>, <INFO>);

		Where <CMD> is one of the following:
		RNA_ADDREF	Add a reference to the current connection. <INFO> should
					be 0.
		RNA_DELREF	Delete a reference to the current connection.  If the
					reference count is decremented to zero then the
					connection is dropped as if the user had selected
					Disconnect. <INFO> should be 0.
		RNA_GETINFO	Will send a WM_NETCONNET message to the window specified
					in the <INFO> parameter.  This allows an application to
					inquire what the entryname of this instance of RNAApp is.

		Finding instances of RNAApp.  By creating a function as follows:

		BOOL FindRNAAppWindow(HWND hWnd, LPARAM lParam)
		{
			TCHAR  	szClassName[32];

			GetClassName (hWnd, szClassName,
				sizeof(szClassName)/sizeof(TCHAR));

			if (!_tcscmp (szClassName, TEXT("Dialog")) &&
				(RNAAPP_MAGIC_NUM == GetWindowLong (hWnd, DWL_USER))) {
				*((HWND *)lParam) = hWnd;
				return FALSE;
				}
			return TRUE;
		}

		And then performing the following command:
		
		EnumWindows(FindRNAAppWindow, (LPARAM)&hOldRNAWnd);

		You can determine the window handle of the currently running instance
		of RNAApp.exe (if any).
		

******************************************************************************/


#include <windows.h>
#include <tchar.h>
#include "string.h"
#include "memory.h"
#include "commctrl.h"
#include "raserror.h"
#include "notify.h"
#include "ras.h"
#include "tapihelp.h"
#include "resource.h"
#include "windev.h"     // for IsAPIReady()
#ifdef USE_SIP
#	include <sipapi.h>
	typedef BOOL (WINAPI* LPFNSIP)(SIPINFO*);
	typedef DWORD (WINAPI* LPFNSIPSTATUS)();
#endif

// direct macro for Shell_NotifyIcon, so that we have it even if the COREDLL thunk is absent
#define Shell_NotifyIcon PRIV_IMPLICIT_DECL(BOOL, SH_SHELL, 6, (DWORD,PNOTIFYICONDATA))

#define SIP_UP      0
#define SIP_DOWN    1

// Globals

const TCHAR     szAppName[] = TEXT("rnaapp");
TCHAR       	EntryName[RAS_MaxEntryName + 1];
RASENTRY    	v_RasEntry;   // The Entry.
HWND        	v_hMainWnd;
HWND        	v_hStatusWnd;
HWND        	v_hCancelBtn;
HWND        	v_hDismissBtn;
HINSTANCE   	v_hInstance;
HRASCONN    	v_hRasConn;
RASDIALPARAMS   v_RasDialParams;
BOOL        	v_fMinOnConnect;
BOOL			v_fNoPassword;
BOOL			v_fNoMsgBox;
BOOL			v_fInErrorBox;
BOOL			v_fReturnFalse;
DWORD			v_RefCount;
DWORD			v_RetryCnt;
BOOL            v_fPassword;
HICON           v_hDirectIcon;
HICON           v_hDialupIcon;
HICON			v_hVPNIcon;
HICON			v_hNotifyIcon;
DWORD			v_dwDeviceID;
RNAAPP_INFO		v_RNAAppInfo;
#ifdef USE_SIP
LPFNSIP         v_lpfnSipGetInfo;
LPFNSIP         v_lpfnSipSetInfo;
LPFNSIPSTATUS	v_lpfnSipStatus;
HINSTANCE 		v_hSipLib;
#endif

// Locals

static	BOOL	NetDisconnect;
static	BOOL	CredentialPrompt;
static  HWND    hCredentials;

#define IDM_TASKBAR_NOTIFY  (WM_USER + 200)
#define IDM_START_RASDIAL   (WM_USER + 201)
	

// Debug Zones 

#ifdef DEBUG
DBGPARAM dpCurSettings = 
{
    TEXT("rnaapp"), 
	{
		TEXT("Unused"),TEXT("Unused"),TEXT("Unused"),TEXT("Unused"),
		TEXT("Unused"),TEXT("Unused"),TEXT("Unused"),TEXT("Unused"),
		TEXT("Unused"),TEXT("Ras"),TEXT("Tapi"),TEXT("Misc"),
		TEXT("Alloc"),TEXT("Function"),TEXT("Warning"),TEXT("Error") 
	},
    0x00000000
}; 

#define ZONE_RAS        DEBUGZONE(9)	    // 0x0200
#define ZONE_TAPI       DEBUGZONE(10)       // 0x0400
#define ZONE_MISC       DEBUGZONE(11)       // 0x0800
#define ZONE_ALLOC      DEBUGZONE(12)       // 0x1000
#define ZONE_FUNCTION   DEBUGZONE(13)       // 0x2000
#define ZONE_WARN       DEBUGZONE(14)       // 0x4000
#define ZONE_ERROR      DEBUGZONE(15)       // 0x8000

#endif  // DEBUG


// What size should we be?

#define SCREEN_WIDTH    240
#define SCREEN_HEIGTH   80


void CALLBACK 
lineCallbackFunc(DWORD dwDevice, DWORD dwMsg, DWORD dwCallbackInstance, 
				 DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
{
   return;
}
void
ShowError (DWORD Message, DWORD Title)
{
    TCHAR           szTemp[218];
    TCHAR           szTemp2[128];
	
	if( v_fNoMsgBox ) {
		return;
	}
	LoadString (v_hInstance, Message, szTemp, sizeof(szTemp)/sizeof(TCHAR));
	LoadString (v_hInstance, Title, szTemp2, sizeof(szTemp2)/sizeof(TCHAR));
	MessageBox( v_hMainWnd, szTemp, szTemp2, MB_SETFOREGROUND | MB_APPLMODAL | MB_OK |
				MB_ICONEXCLAMATION);
}
void
SetTapiDisplayStuff(HWND hDlg)
{
    TCHAR	szPhone[256];
    LPTSTR  pLocName;

	szPhone[0] = TEXT('\0');

	RasGetDispPhoneNum (NULL, EntryName, szPhone, sizeof(szPhone));
	SetWindowText(GetDlgItem(hDlg, IDC_PHONE), szPhone);
        
    if (pLocName = TapiGetDefaultLocationName()) {
        SetWindowText(GetDlgItem(hDlg, IDC_DIALFROM), pLocName);
        LocalFree(pLocName);
    }    
    return;
}

LRESULT CALLBACK
DlgProcCredentials( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
    BOOL RemovePassword;
    static BOOL fReEnable = FALSE;

    switch( message ) {
    case WM_INITDIALOG:
		// Since main window is hidden, I need to bring myself to the
		// foreground
		//
		SetForegroundWindow ( hDlg );
		if (!_tcscmp (v_RasEntry.szDeviceType, RASDT_Modem)) {
            SendMessage(GetDlgItem(hDlg, IDC_STATUSICON), STM_SETIMAGE,
                        IMAGE_ICON, (LPARAM) v_hDialupIcon);
		} else if (!_tcscmp (v_RasEntry.szDeviceType, RASDT_Direct)) {
            SendMessage(GetDlgItem(hDlg, IDC_STATUSICON), STM_SETIMAGE,
                        IMAGE_ICON, (LPARAM) v_hDirectIcon);
		} else if (!_tcscmp (v_RasEntry.szDeviceType, RASDT_Vpn)) {
            SendMessage(GetDlgItem(hDlg, IDC_STATUSICON), STM_SETIMAGE,
                        IMAGE_ICON, (LPARAM) v_hVPNIcon);
		} else {
			RETAILMSG (1, (TEXT("Error, unhandled Device Type\r\n")));
			ASSERT (0);
		}


		hCredentials = hDlg;				// save handle for cancel

        SetWindowText(GetDlgItem(hDlg, IDC_ENTRYNAME), EntryName);

        SetTapiDisplayStuff(hDlg);
        
        SetDlgItemText( hDlg, IDC_USERNAME, v_RasDialParams.szUserName );
        SetDlgItemText( hDlg, IDC_PASSWORD, v_RasDialParams.szPassword );
        SetDlgItemText( hDlg, IDC_DOMAIN, v_RasDialParams.szDomain );

        if (v_fPassword) {
            // A password has been saved so check the box
            SendMessage(GetDlgItem(hDlg, IDC_SAVEPASSWORD), BM_SETCHECK,1,0);
        }
		
        if (v_RasDialParams.szUserName[0] == TEXT('\0')) {
            SetFocus(GetDlgItem(hDlg, IDC_USERNAME));
		} else {
            SetFocus(GetDlgItem(hDlg, IDC_PASSWORD));
		}
        return FALSE;

    case WM_COMMAND:
        
        switch( LOWORD( wParam ) ) {
        case IDCANCEL: 				// Ignore values

            EndDialog( hDlg, FALSE );
            break;

        case IDCONNECT: 					// Get the dialog values

            GetDlgItemText( hDlg, IDC_USERNAME,
							v_RasDialParams.szUserName, UNLEN + 1);

            GetDlgItemText( hDlg, IDC_PASSWORD,
							v_RasDialParams.szPassword, PWLEN + 1);

            GetDlgItemText( hDlg, IDC_DOMAIN,
							v_RasDialParams.szDomain, DNLEN + 1);

            if (SendMessage(GetDlgItem(hDlg, IDC_SAVEPASSWORD),
							BM_GETCHECK, 0, 0)) {
                RemovePassword = FALSE;
            } else {
                RemovePassword = TRUE;
            }
            RasSetEntryDialParams( NULL, &v_RasDialParams, RemovePassword );
            EndDialog( hDlg, TRUE );
            break;

        case IDDIALPROPERTIES:
            lineTranslateDialog(v_hLineApp, v_dwDeviceID, v_dwVersion,
								hDlg, NULL);
            SetTapiDisplayStuff(hDlg);
            break;
            
#ifdef USE_SIP
        case IDC_PASSWORD:
            if (v_lpfnSipGetInfo && v_lpfnSipSetInfo &&
                ((HIWORD(wParam) == EN_SETFOCUS) || 
                ((HIWORD(wParam) == EN_KILLFOCUS) &&
                  fReEnable)))
            {
                SIPINFO si;

                memset(&si, 0, sizeof(SIPINFO));
                si.cbSize = sizeof(SIPINFO);
                if ((*v_lpfnSipGetInfo)(&si))
                {
                    // Toggle password completion, but keep track of 
                    // whether or not this flag was set a priori when setting focus
                    if (HIWORD(wParam) == EN_SETFOCUS)
                    {
                        fReEnable = !(si.fdwFlags & SIPF_DISABLECOMPLETION);
                        si.fdwFlags |= SIPF_DISABLECOMPLETION;
                    }
                    else
                    {
                        si.fdwFlags &= ~SIPF_DISABLECOMPLETION;
                    }
		            (*v_lpfnSipSetInfo)(&si);
                }
            }
            break;
#endif

        default:

            break;
        }

    case WM_DESTROY:

        return( FALSE );

    default:
		
        return( FALSE );
        break;
    }
}

VOID
SetStatusWnd (DWORD StringID)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
92精品国产成人观看免费| 欧美国产激情一区二区三区蜜月| 日韩美女视频一区二区在线观看| 久久久久久久久一| 亚洲综合一区二区| 成人在线视频首页| 欧美不卡一二三| 亚洲国产精品一区二区久久恐怖片| 国产一区二区电影| 欧美疯狂做受xxxx富婆| 一区视频在线播放| 国产精品123区| 欧美一个色资源| 亚洲国产日韩一区二区| 99久久精品国产导航| 久久你懂得1024| 久久精品免费观看| 91麻豆精品久久久久蜜臀| 亚洲最大色网站| 色婷婷亚洲精品| 亚洲欧美在线aaa| 成人高清免费在线播放| 国产欧美日韩麻豆91| 国产精品一区二区在线看| 日韩免费高清av| 毛片av一区二区| 欧美一区二区三区在| 日本特黄久久久高潮| 3d成人动漫网站| 日韩国产欧美在线播放| 欧美视频你懂的| 亚洲第一激情av| 欧美伊人精品成人久久综合97 | 一区二区免费在线| 91蝌蚪porny| 亚洲精品国产视频| 欧洲av一区二区嗯嗯嗯啊| 一区二区三区日韩精品视频| 在线观看91视频| 天堂午夜影视日韩欧美一区二区| 欧美精品乱人伦久久久久久| 五月激情六月综合| 欧美成人r级一区二区三区| 精品亚洲国内自在自线福利| 久久夜色精品国产噜噜av| 国产成人精品一区二| 自拍偷拍国产亚洲| 欧美日韩亚洲不卡| 天天射综合影视| 久久亚洲二区三区| 99在线热播精品免费| 亚洲国产裸拍裸体视频在线观看乱了 | 99久久精品情趣| 亚洲综合激情另类小说区| 欧美二区乱c少妇| 国产永久精品大片wwwapp| 中文无字幕一区二区三区| 91在线精品一区二区| 亚洲成av人影院| 久久久美女毛片| 色婷婷精品大在线视频| 日韩精彩视频在线观看| 久久久久免费观看| 欧美在线观看一区| 国产自产视频一区二区三区| 综合在线观看色| 日韩欧美一级精品久久| 成人sese在线| 麻豆91免费看| 亚洲欧洲综合另类在线| 日韩免费高清av| 一本到不卡免费一区二区| 麻豆91在线播放| 亚洲资源中文字幕| 中文字幕乱码久久午夜不卡 | 日本vs亚洲vs韩国一区三区| 国产女人18毛片水真多成人如厕| 欧美日韩色一区| www.欧美色图| 国内国产精品久久| 午夜精品影院在线观看| 国产精品色婷婷久久58| 日韩视频在线你懂得| 日本电影欧美片| 成人精品免费看| 久久综合综合久久综合| 亚洲一区二区美女| 中文字幕亚洲精品在线观看| 亚洲精品一区二区三区福利| 欧美在线你懂得| 99这里只有久久精品视频| 国产在线精品免费av| 三级一区在线视频先锋| 亚洲精品国产视频| 亚洲婷婷综合色高清在线| 欧美激情一区不卡| 精品成人免费观看| 欧美不卡激情三级在线观看| 欧美男男青年gay1069videost| www.性欧美| 成人黄页毛片网站| 国产一区二区三区不卡在线观看 | 91精品欧美久久久久久动漫| 在线免费一区三区| 色综合久久天天综合网| 国产69精品久久777的优势| 久久99精品国产麻豆婷婷| 亚洲va国产va欧美va观看| 亚洲激情五月婷婷| 国产精品成人在线观看| 国产精品女主播在线观看| 久久午夜色播影院免费高清| 精品国产一区二区在线观看| 日韩精品一区在线观看| 欧美一区二区在线播放| 91精品视频网| 日韩欧美中文字幕精品| 日韩欧美一卡二卡| 久久免费美女视频| 中文一区在线播放| 亚洲欧美自拍偷拍色图| 亚洲精品欧美专区| 亚洲一区二区三区四区在线免费观看 | 久久er99热精品一区二区| 蜜桃视频在线观看一区| 久久99精品久久久久久久久久久久 | 亚洲国产精品久久一线不卡| 亚洲一区二区偷拍精品| 五月婷婷久久丁香| 麻豆视频观看网址久久| 国内精品视频一区二区三区八戒 | 91碰在线视频| 日本道色综合久久| 91精品中文字幕一区二区三区| 欧美一区二区三区喷汁尤物| 欧美一卡二卡三卡| 国产女同互慰高潮91漫画| 亚洲九九爱视频| 五月天激情小说综合| 久久国产精品99精品国产| 成熟亚洲日本毛茸茸凸凹| 91麻豆国产香蕉久久精品| 欧美午夜精品久久久| 欧美成人精品福利| 国产精品午夜在线观看| 亚洲国产日韩a在线播放| 激情图片小说一区| 一本到三区不卡视频| 日韩欧美激情四射| 综合激情网...| 日韩精品国产精品| 99久久婷婷国产综合精品 | 久久久久久久久久久久久夜| 中文字幕视频一区二区三区久| 亚洲成av人**亚洲成av**| 国产伦精品一区二区三区免费迷 | 粉嫩绯色av一区二区在线观看| 欧洲一区在线电影| 国产亚洲成年网址在线观看| 一区二区三区高清不卡| 国产一区二区毛片| 色又黄又爽网站www久久| 欧美一二三四在线| 亚洲精品v日韩精品| 国产成人免费视| 69p69国产精品| 亚洲天堂免费在线观看视频| 蜜臀av性久久久久av蜜臀妖精| 一道本成人在线| 欧美国产成人精品| 另类中文字幕网| 欧美日韩不卡一区二区| 一区在线播放视频| 国产精品亚洲综合一区在线观看| 8v天堂国产在线一区二区| 亚洲欧洲三级电影| 国产jizzjizz一区二区| 欧美一卡2卡3卡4卡| 亚洲午夜影视影院在线观看| 成人av电影免费在线播放| 26uuu亚洲综合色欧美 | 亚洲另类在线视频| 国产成人av福利| 久久色在线视频| 日韩国产精品久久久| 欧美日韩一区久久| 亚洲精品综合在线| 91免费视频网| 成人欧美一区二区三区1314| 懂色av一区二区夜夜嗨| 欧美xxxxx牲另类人与| 蜜臀av性久久久久蜜臀aⅴ四虎 | 99re在线精品| 国产精品欧美久久久久一区二区| 国产乱子伦一区二区三区国色天香| 欧美刺激午夜性久久久久久久| 日韩av网站在线观看| 欧美精品在线观看一区二区| 香蕉久久一区二区不卡无毒影院 | 视频一区视频二区在线观看|