共用方式為


__dllonexit

註冊要呼叫的常式結束時間。

_onexit_t __dllonexit(
   _onexit_t func,
   _PVFV **  pbegin, 
   _PVFV **  pend 
   )

參數

  • func
    in 要執行的函式的指標在匯出。

  • pbegin
    在中斷連結指向函式清單開始執行之變數的指標。

  • pend
    在中斷連結指向函式清單結束執行之變數的指標。

傳回值

如果成功,指標對使用者的函式。 否則, null 指標。

備註

__dllonexit 函式類似於 _onexit 函式,但是該函式使用的全域變數不會看見這個常式。 而不是全域變數,這個函式會使用 pbegin 和 pend 參數。

在與 MSVCRT.LIB 連結的 DLL 的 _onexitatexit 函式必須維護自己的 atexit/_onexit 清單。 這個常式是這類 DLL 呼叫的背景工作。

_PVFV型別被定義為 typedef void (__cdecl *_PVFV)(void)。

需求

常式

必要檔案

__dllonexit

onexit.c

請參閱

參考

_onexit、_onexit_m