"Fossies" - the Fresh Open Source Software Archive

Member "mod_spnego-0.2.0/main.c" (8 May 2011, 1535 Bytes) of package /linux/www/apache_httpd_modules/old/mod_spnego-0.2.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "main.c" see the Fossies "Dox" file reference documentation.

    1 /* -----------------------------------------------------------------------------
    2  * main.c defines the Windows entry point.
    3  *
    4  * Author: Frank Balluffi and Markus Moeller
    5  *
    6  * Copyright (C) 2002-2007 Frank Balluffi and Markus Moeller. All rights
    7  * reserved.
    8  *
    9  * Licensed under the Apache License, Version 2.0 (the "License");
   10  * you may not use this file except in compliance with the License.
   11  * You may obtain a copy of the License at
   12  *
   13  *     http://www.apache.org/licenses/LICENSE-2.0
   14  *
   15  * Unless required by applicable law or agreed to in writing, software
   16  * distributed under the License is distributed on an "AS IS" BASIS,
   17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   18  * See the License for the specific language governing permissions and
   19  * limitations under the License.
   20  * -----------------------------------------------------------------------------
   21  */
   22 
   23 #include <stdio.h>
   24 #define WIN32_LEAN_AND_MEAN
   25 #include <windows.h>
   26 
   27 BOOL WINAPI
   28 DllMain(HINSTANCE hInstance,
   29     DWORD reason,
   30     LPVOID reserved)
   31 {
   32     const char *reasonString = NULL;
   33 
   34     printf("mod_spnego: entering DllMain for ");
   35 
   36     switch (reason) {
   37     case DLL_PROCESS_ATTACH:
   38     reasonString = "DLL_PROCESS_ATTACH";
   39     break;
   40 
   41     case DLL_PROCESS_DETACH:
   42     reasonString = "DLL_PROCESS_DETACH";
   43     break;
   44 
   45     case DLL_THREAD_ATTACH:
   46     reasonString = "DLL_THREAD_ATTACH";
   47     break;
   48 
   49     case DLL_THREAD_DETACH:
   50     reasonString = "DLL_THREAD_DETACH";
   51     break;
   52     }
   53 
   54     printf(reasonString);
   55     printf("\n");
   56     return TRUE;
   57 }