]>
git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSWindows/DNSServiceBrowser/Windows/Sources/Application.cpp
1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2002-2004 Apple Computer, Inc. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 Change History (most recent first):
19 $Log: Application.cpp,v $
20 Revision 1.3 2006/08/14 23:25:49 cheshire
21 Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0
23 Revision 1.2 2004/07/13 21:24:26 rpantos
24 Fix for <rdar://problem/3701120>.
26 Revision 1.1 2004/06/18 04:04:36 rpantos
29 Revision 1.2 2004/01/30 02:56:32 bradley
30 Updated to support full Unicode display. Added support for all services on www.dns-sd.org.
32 Revision 1.1 2003/08/21 02:06:47 bradley
33 Moved DNSServiceBrowser for non-Windows CE into Windows sub-folder.
35 Revision 1.5 2003/08/12 19:56:28 cheshire
38 Revision 1.4 2003/07/02 21:20:06 cheshire
39 <rdar://problem/3313413> Update copyright notices, etc., in source code comments
41 Revision 1.3 2002/09/21 20:44:55 zarzycki
44 Revision 1.2 2002/09/20 08:37:34 bradley
45 Increased the DNS record cache from the default of 64 to 512 entries for larger networks.
47 Revision 1.1 2002/09/20 06:12:51 bradley
48 DNSServiceBrowser for Windows
56 #include "DNSServices.h"
58 #include "Application.h"
60 #include "ChooserDialog.h"
67 static char THIS_FILE
[] = __FILE__
;
70 //===========================================================================================================================
72 //===========================================================================================================================
74 BEGIN_MESSAGE_MAP(Application
, CWinApp
)
75 //{{AFX_MSG_MAP(Application)
76 // NOTE - the ClassWizard will add and remove mapping macros here.
77 // DO NOT EDIT what you see in these blocks of generated code!
79 ON_COMMAND(ID_HELP
, CWinApp::OnHelp
)
82 //===========================================================================================================================
84 //===========================================================================================================================
88 //===========================================================================================================================
90 //===========================================================================================================================
92 Application::Application( void )
97 //===========================================================================================================================
99 //===========================================================================================================================
101 BOOL
Application::InitInstance()
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();