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

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

?? crtdll.c

?? C標準庫源代碼,能提高對C的理解,不錯的哦
?? C
字號:
/***
*crtdll.c - CRT initialization for a DLL using the MSVCRT* model of C run-time
*
*       Copyright (c) 1991-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
*       This module contains the initialization entry point for the C run-time
*       stub in this DLL.  All C run-time code is located in the C Run-Time
*       Library DLL "MSVCRT*.DLL", except for a little bit of start-up code in
*       the EXE, and this code in each DLL.  This code is necessary to invoke
*       the C++ constructors for the C++ code in this DLL.
*
*       This entry point should either be specified as the DLL initialization
*       entry point, or else it must be called by the DLL initialization entry
*       point of the DLL with the same arguments that the entry point receives.
*
*       MPPC note:
*       This is the routine should be pulled in when building a DLL using CRT DLL
*       This should be put into ppccrt30.lib
*       User should either use _DllMainCRTStartup as -Init, and put their own init(if any) in _DllInit
*       Or call _DllMainCRTStartup in their init specified by -Init*
*
*******************************************************************************/

#ifndef _MAC

#ifdef CRTDLL

/*
 * SPECIAL BUILD MACRO! Note that crtexe.c (and crtexew.c) is linked in with
 * the client's code. It does not go into crtdll.dll! Therefore, it must be
 * built under the _DLL switch (like user code) and CRTDLL must be undefined.
 */
#undef  CRTDLL
#define _DLL

#include <cruntime.h>
#include <oscalls.h>
#include <internal.h>
#include <stdlib.h>
#define _DECL_DLLMAIN   /* enable prototypes for DllMain and _CRT_INIT */
#include <process.h>
#include <dbgint.h>


#ifdef _M_IX86

/*
 * The local copy of the Pentium FDIV adjustment flag
 *      and the address of the flag in MSVCRT*.DLL.
 */

extern int _adjust_fdiv;

extern int * _imp___adjust_fdiv;

#endif  /* _M_IX86 */


/*
 * routine in DLL to do initialization (in this case, C++ constructors)
 */

extern void __cdecl _initterm(_PVFV *, _PVFV *);

/*
 * pointers to initialization sections
 */

extern _PVFV __xc_a[], __xc_z[];    /* C++ initializers */

/*
 * flag set iff _CRTDLL_INIT was called with DLL_PROCESS_ATTACH
 */
static int __proc_attached = 0;


/*
 * Pointers to beginning and end of the table of function pointers manipulated
 * by _onexit()/atexit().  The atexit/_onexit code is shared for both EXE's and
 * DLL's but different behavior is required.  These values are initialized to
 * 0 by default and will be set to point to a malloc-ed memory block to mark
 * this module as an DLL.
 */

extern _PVFV *__onexitbegin;
extern _PVFV *__onexitend;


/*
 * User routine DllMain is called on all notifications
 */

extern BOOL WINAPI DllMain(
        HANDLE  hDllHandle,
        DWORD   dwReason,
        LPVOID  lpreserved
        ) ;

/* _pRawDllMain MUST be a common variable, not extern nor initialized! */

BOOL (WINAPI *_pRawDllMain)(HANDLE, DWORD, LPVOID);


/***
*BOOL WINAPI _CRT_INIT(hDllHandle, dwReason, lpreserved) - C++ DLL
*       initialization.
*BOOL WINAPI _DllMainCRTStartup(hDllHandle, dwReason, lpreserved) - C++ DLL
*       initialization.
*
*Purpose:
*       This is the entry point for DLL's linked with the C/C++ run-time libs.
*       This routine does the C runtime initialization for a DLL linked with
*       MSVCRT.LIB (whose C run-time code is thus in MSVCRT*.DLL.)
*       It will call the user notification routine DllMain on all 4 types of
*       DLL notifications.  The return code from this routine is the return
*       code from the user notification routine.
*
*       On DLL_PROCESS_ATTACH, the C++ constructors for the DLL will be called.
*
*       On DLL_PROCESS_DETACH, the C++ destructors and _onexit/atexit routines
*       will be called.
*
*Entry:
*
*Exit:
*
*******************************************************************************/

BOOL WINAPI _CRT_INIT(
        HANDLE  hDllHandle,
        DWORD   dwReason,
        LPVOID  lpreserved
        )
{
        /*
         * If this is a process detach notification, check that there has
         * been a prior (successful) process attachment.
         */
        if ( dwReason == DLL_PROCESS_DETACH ) {
            if ( __proc_attached > 0 )
                __proc_attached--;
            else
                /*
                 * no prior process attach. just return failure.
                 */
                return FALSE;
        }

#ifdef _M_IX86

        /*
         * Set the local copy of the Pentium FDIV adjustment flag
         */

        _adjust_fdiv = * _imp___adjust_fdiv;

#endif  /* _M_IX86 */

        /*
         * do C++ constructors (initializers) specific to this DLL
         */

        if ( dwReason == DLL_PROCESS_ATTACH ) {

            /*
             * create the onexit table.
             */
            if ( (__onexitbegin = (_PVFV *)_malloc_crt(32 * sizeof(_PVFV)))
                 == NULL )
                /*
                 * cannot allocate minimal required
                 * size. generate failure to load DLL
                 */
                return FALSE;

            *(__onexitbegin) = (_PVFV) NULL;

            __onexitend = __onexitbegin;

            /*
             * Invoke C++ constructors
             */
            _initterm(__xc_a,__xc_z);

            /*
             * Increment the process attached flag.
             */
            __proc_attached++;

        }
        else if ( dwReason == DLL_PROCESS_DETACH ) {

            /*
             * Any basic clean-up code that goes here must be
             * duplicated below in _DllMainCRTStartup for the
             * case where the user's DllMain() routine fails on a
             * Process Attach notification. This does not include
             * calling user C++ destructors, etc.
             */

            /*
             * do _onexit/atexit() terminators
             * (if there are any)
             *
             * These terminators MUST be executed in
             * reverse order (LIFO)!
             *
             * NOTE:
             *  This code assumes that __onexitbegin
             *  points to the first valid onexit()
             *  entry and that __onexitend points
             *  past the last valid entry. If
             *  __onexitbegin == __onexitend, the
             *  table is empty and there are no
             *  routines to call.
             */

            if (__onexitbegin) {
                _PVFV * pfend = __onexitend;

                while ( -- pfend >= __onexitbegin )
                    /*
                     * if current table entry is not
                     * NULL, call thru it.
                     */
                    if ( *pfend != NULL )
                        (**pfend)();

                /*
                 * free the block holding onexit table to
                 * avoid memory leaks.  Also zero the ptr
                 * variable so that it is clearly cleaned up.
                 */

                _free_crt ( __onexitbegin ) ;

                __onexitbegin = NULL ;
            }
        }

        return TRUE;
}


BOOL WINAPI _DllMainCRTStartup(
        HANDLE  hDllHandle,
        DWORD   dwReason,
        LPVOID  lpreserved
        )
{
        BOOL retcode = TRUE;

        /*
         * If this is a process detach notification, check that there has
         * been a prior process attach notification.
         */
        if ( (dwReason == DLL_PROCESS_DETACH) && (__proc_attached == 0) )
            return FALSE;

        if ( dwReason == DLL_PROCESS_ATTACH || dwReason == DLL_THREAD_ATTACH )
        {
            if ( _pRawDllMain )
                retcode = (*_pRawDllMain)(hDllHandle, dwReason, lpreserved);

            if ( retcode )
                retcode = _CRT_INIT(hDllHandle, dwReason, lpreserved);

            if ( !retcode )
                return FALSE;
        }

        retcode = DllMain(hDllHandle, dwReason, lpreserved);


        if ( (dwReason == DLL_PROCESS_ATTACH) && !retcode )
            /*
             * The user's DllMain routine returned failure, the C runtime
             * needs to be cleaned up. Do this by calling _CRT_INIT again,
             * this time imitating DLL_PROCESS_DETACH. Note this will also
             * clear the __proc_attached flag so the cleanup will not be
             * repeated upon receiving the real process detach notification.
             */
            _CRT_INIT(hDllHandle, DLL_PROCESS_DETACH, lpreserved);

        if ( (dwReason == DLL_PROCESS_DETACH) ||
             (dwReason == DLL_THREAD_DETACH) )
        {
            if ( _CRT_INIT(hDllHandle, dwReason, lpreserved) == FALSE )
                retcode = FALSE ;

            if ( retcode && _pRawDllMain )
                retcode = (*_pRawDllMain)(hDllHandle, dwReason, lpreserved);
        }

        return retcode ;
}

#endif  /* CRTDLL */

#else  /* _MAC */

#include <cruntime.h>
#include <internal.h>
#include <stdlib.h>
#include <fltintrn.h>
#include <dbgint.h>
#include <macos\types.h>
#include <macos\fragload.h>

/*
 * routine in DLL to do initialization (in this case, C++ constructors)
 */
extern void __cdecl _initterm(PFV *, PFV *);
static char * __cdecl _p2cstr_internal ( unsigned char * str );
static void * memcpy_internal ( void * dst, const void * src,   size_t count);
int _DllInit(InitBlockPtr pinitBlk);

/*
 * pointers to initialization functions
 */

extern PFV __xi_a ;

extern PFV __xi_z ;

extern PFV __xc_a ;  /* C++ initializers */

extern PFV __xc_z ;

extern PFV __xp_a ;  /* C pre-terminators */

extern PFV __xp_z ;

extern PFV __xt_a ;   /* C terminators */

extern PFV __xt_z ;

/*this globals are defined in DLL */
extern int __argc;

extern char **__argv;

extern PFV *__onexitbegin;
extern PFV *__onexitend;

/***
*void _DllMainCRTStartup(void)
*
*Purpose:
*       This routine does the C runtime initialization.
*
*Entry:
*
*Exit:
*
*******************************************************************************/

OSErr _DllMainCRTStartup(
        InitBlockPtr pinitBlk
        )
{
        int argc=1; /* three standard arguments to main */
        char *argv[2];
        char **environ = NULL;
        char szPgmName[32];
        char *pArg;


        memcpy_internal(szPgmName, (char *)0x910, sizeof(szPgmName));
        pArg = _p2cstr_internal(szPgmName);
        argv[0] = pArg;
        argv[1] = NULL;

        __argc = 1;
        __argv = argv;

        /*
         * intialize the global destruction table
         */
        if ( (__onexitbegin = (PFV *)_malloc_crt(32 * sizeof(PFV))) == NULL )
                        {
                        /*
                         * cannot allocate minimal required
                         * size. generate failure to load DLL
                         * any non-zero value will do...
                         */
                        return 1;
                        }

        *(__onexitbegin) = (PFV) NULL;

        __onexitend = __onexitbegin;

        /*
         * Do runtime startup initializers.
         */
        _initterm( &__xi_a, &__xi_z );


        /*
         * do C++ constructors (initializers) specific to this DLL
         */
        _initterm( &__xc_a, &__xc_z );

        return _DllInit(pinitBlk);
}

static char * __cdecl _p2cstr_internal (
        unsigned char * str
        )
{
        unsigned char *pchSrc;
        unsigned char *pchDst;
        int  cch;

        if ( str && *str )
            {
            pchDst = str;
            pchSrc = str + 1;

            for ( cch=*pchDst; cch; --cch )
                {
                *pchDst++ = *pchSrc++;
                }

            *pchDst = '\0';
            }

        return( str );
}


static void * memcpy_internal (
        void * dst,
        const void * src,
        size_t count
        )
{
        void * ret = dst;

        /*
         * copy from lower addresses to higher addresses
         */
        while (count--) {
            *(char *)dst = *(char *)src;
            dst = (char *)dst + 1;
            src = (char *)src + 1;
        }

        return(ret);
}

#endif  /* _MAC */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久精品免费免费| 亚洲高清在线精品| 一区二区三区在线看| 奇米精品一区二区三区在线观看一| 精品在线观看免费| 在线视频你懂得一区二区三区| 日韩欧美国产午夜精品| 夜夜操天天操亚洲| 成人激情图片网| 日韩无一区二区| 亚洲一二三四在线观看| 成人精品gif动图一区| 日韩欧美高清dvd碟片| 亚洲一级在线观看| 91女厕偷拍女厕偷拍高清| 欧美不卡在线视频| 日日欢夜夜爽一区| 欧美在线观看你懂的| 国产精品久久久久三级| 激情综合五月天| 在线不卡的av| 亚洲成在线观看| 91电影在线观看| 亚洲精品视频在线| 97久久精品人人澡人人爽| 国产欧美一区二区在线| 国产一区二区日韩精品| 精品久久久网站| 韩国女主播成人在线| 精品国产一区a| 国模无码大尺度一区二区三区| 欧美一区二区三区免费大片| 日韩一区精品字幕| 欧美日韩国产片| 首页欧美精品中文字幕| 欧美日韩亚洲综合在线 | 亚洲在线观看免费视频| 99re这里都是精品| 亚洲精品自拍动漫在线| 色婷婷综合久久久久中文| 日韩伦理免费电影| 欧美色图一区二区三区| 午夜视频在线观看一区二区| 69堂成人精品免费视频| 久久se这里有精品| 久久综合色播五月| 国产aⅴ精品一区二区三区色成熟| 久久精品夜色噜噜亚洲a∨| 国产不卡在线视频| 国产精品久久久久天堂| 欧美在线制服丝袜| 奇米888四色在线精品| 久久在线观看免费| 99久久综合精品| 亚洲午夜精品一区二区三区他趣| 欧美日韩国产电影| 国产乱色国产精品免费视频| 日本一二三不卡| 91蜜桃免费观看视频| 亚洲午夜在线视频| 欧美成人伊人久久综合网| 国产美女久久久久| 亚洲欧洲日产国码二区| 欧美精品自拍偷拍动漫精品| 国产在线精品一区在线观看麻豆| 中文字幕一区二区在线观看| 777a∨成人精品桃花网| 国产精品一二三四| 亚洲va韩国va欧美va精品| 日韩免费看的电影| 北条麻妃国产九九精品视频| 日日摸夜夜添夜夜添精品视频 | 欧美日韩一区二区不卡| 国产麻豆欧美日韩一区| 亚洲一区二区三区爽爽爽爽爽 | 亚洲婷婷在线视频| 日韩一区二区三区电影| 99久久精品国产观看| 老色鬼精品视频在线观看播放| 亚洲四区在线观看| 久久美女高清视频| 欧美久久久久免费| 成人av网站免费观看| 免费久久99精品国产| 亚洲免费观看高清完整| 精品国产一区二区精华| 欧美日韩精品欧美日韩精品| 成人国产免费视频| 久久精品国产亚洲aⅴ| 一区二区三区四区中文字幕| 国产亚洲精品aa午夜观看| 欧美视频在线观看一区| 99视频一区二区三区| 精品一区二区影视| 日日骚欧美日韩| 亚洲地区一二三色| 一区二区不卡在线视频 午夜欧美不卡在 | 91麻豆精品国产91久久久久久久久| 成人av片在线观看| 国产成人a级片| 国产精品77777| 精品一区二区三区视频| 日韩精品电影在线观看| 亚洲小说欧美激情另类| 一区二区在线免费观看| 国产精品久久久久毛片软件| 国产亚洲欧美日韩日本| 亚洲精品一区二区精华| 日韩午夜小视频| 日韩精品一区二区三区三区免费| 911国产精品| 欧美精品黑人性xxxx| 欧美美女直播网站| 91精品黄色片免费大全| 欧美日韩视频一区二区| 欧美精品日韩综合在线| 欧美性色aⅴ视频一区日韩精品| 色综合久久中文综合久久牛| 不卡av电影在线播放| 成人视屏免费看| 粉嫩绯色av一区二区在线观看| 国产成人综合亚洲网站| 成人自拍视频在线| 99久久综合99久久综合网站| 成人免费视频免费观看| 91尤物视频在线观看| 色哟哟一区二区| 欧美午夜宅男影院| 777奇米四色成人影色区| 精品日韩99亚洲| 久久久精品国产免费观看同学| 久久久精品影视| 国产精品久久久久久久第一福利 | 日韩午夜中文字幕| 久久婷婷久久一区二区三区| 久久精品欧美一区二区三区麻豆| 欧美激情一区二区三区| 亚洲免费观看高清在线观看| 五月天激情小说综合| 麻豆成人免费电影| 风间由美一区二区三区在线观看 | 波多野结衣中文一区| 欧美亚洲国产怡红院影院| 91精品国产91热久久久做人人| 日韩精品影音先锋| 国产精品久久久久久久久免费相片 | 国产一区二区三区在线观看精品 | 亚洲人亚洲人成电影网站色| 亚洲成人动漫一区| 国产电影一区二区三区| 在线一区二区三区| 日韩一级黄色片| 国产精品素人视频| 日本强好片久久久久久aaa| 国产成人精品免费| 欧美老女人第四色| 国产精品沙发午睡系列990531| 亚洲一区在线观看视频| 国产做a爰片久久毛片| 色一情一伦一子一伦一区| 日韩欧美激情四射| 亚洲一区在线观看免费观看电影高清| 久久不见久久见免费视频7| 91性感美女视频| 国产精品网站一区| 亚洲成人av电影| 懂色av中文一区二区三区 | 国产亚洲综合在线| 亚洲成人综合在线| 97精品国产97久久久久久久久久久久| 欧美一区二区三区四区视频| 日韩美女视频19| 国产精品77777| 日韩午夜激情av| 午夜久久久久久久久| 91视视频在线观看入口直接观看www | 欧美mv日韩mv| 水野朝阳av一区二区三区| 91热门视频在线观看| 久久精品一区四区| 久久99国产精品久久99| 欧美日韩精品电影| 亚洲欧美另类图片小说| 国产成人精品影视| 欧美tickling挠脚心丨vk| 天天射综合影视| 欧美系列日韩一区| 亚洲国产综合91精品麻豆| 91麻豆高清视频| 中文字幕欧美一| 成人久久久精品乱码一区二区三区| 日韩女同互慰一区二区| 免费高清不卡av| 7777精品伊人久久久大香线蕉超级流畅| 亚洲欧美国产77777| 91在线小视频| 亚洲欧美偷拍三级| 在线观看不卡视频| 亚洲第一成人在线| 欧美丰满美乳xxx高潮www|