]>
git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSWindows/Applications/DNSServiceBrowser/Windows/Sources/Application.cpp
2 * Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
23 Change History (most recent first):
25 $Log: Application.cpp,v $
26 Revision 1.1 2003/08/21 02:06:47 bradley
27 Moved Rendezvous Browser for non-Windows CE into Windows sub-folder.
29 Revision 1.5 2003/08/12 19:56:28 cheshire
32 Revision 1.4 2003/07/02 21:20:06 cheshire
33 <rdar://problem/3313413> Update copyright notices, etc., in source code comments
35 Revision 1.3 2002/09/21 20:44:55 zarzycki
38 Revision 1.2 2002/09/20 08:37:34 bradley
39 Increased the DNS record cache from the default of 64 to 512 entries for larger networks.
41 Revision 1.1 2002/09/20 06:12:51 bradley
42 Rendezvous Browser for Windows
48 #include "DNSServices.h"
50 #include "Application.h"
52 #include "ChooserDialog.h"
59 static char THIS_FILE
[] = __FILE__
;
62 //===========================================================================================================================
64 //===========================================================================================================================
66 BEGIN_MESSAGE_MAP(Application
, CWinApp
)
67 //{{AFX_MSG_MAP(Application)
68 // NOTE - the ClassWizard will add and remove mapping macros here.
69 // DO NOT EDIT what you see in these blocks of generated code!
71 ON_COMMAND(ID_HELP
, CWinApp::OnHelp
)
74 //===========================================================================================================================
76 //===========================================================================================================================
80 //===========================================================================================================================
82 //===========================================================================================================================
84 Application::Application( void )
89 //===========================================================================================================================
91 //===========================================================================================================================
93 BOOL
Application::InitInstance()
97 // WinSock initialization.
99 if( !AfxSocketInit() )
101 AfxMessageBox( IDP_SOCKETS_INIT_FAILED
);
105 // Standard MFC initialization.
107 #if( !defined( AFX_DEPRECATED ) )
109 Enable3dControls(); // Call this when using MFC in a shared DLL
111 Enable3dControlsStatic(); // Call this when linking to MFC statically
115 InitCommonControls();
117 // Set up DNS Services.
119 err
= DNSServicesInitialize( 0, 512 );
120 assert( err
== kDNSNoErr
);
122 // Create the chooser dialog.
124 ChooserDialog
* dialog
;
127 dialog
= new ChooserDialog
;
128 dialog
->Create( IDD_CHOOSER_DIALOG
);
130 dialog
->ShowWindow( SW_SHOW
);
135 //===========================================================================================================================
137 //===========================================================================================================================
139 int Application::ExitInstance( void )
141 // Clean up DNS Services.
143 DNSServicesFinalize();