Ignore:
Timestamp:
Feb 20, 2003, 10:47:19 AM (23 years ago)
Author:
sandervl
Message:

KSO: Added custombuild API for registering a callback for LX Dll loading thru LoadLibrary*()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/custombuild.h

    r9798 r9829  
    2424                                        LPVOID lpHandleData);
    2525
    26 typedef BOOL   (* WIN32API PFNDRVREAD)(LPVOID        lpDriverData, 
     26typedef BOOL   (* WIN32API PFNDRVREAD)(LPVOID        lpDriverData,
    2727                                       HANDLE        hDevice,
    2828                                       DWORD         dwFlags,
     
    3434                                       LPVOID        lpHandleData);
    3535
    36 typedef BOOL   (* WIN32API PFNDRVWRITE)(LPVOID        lpDriverData, 
     36typedef BOOL   (* WIN32API PFNDRVWRITE)(LPVOID        lpDriverData,
    3737                                        HANDLE        hDevice,
    3838                                        DWORD         dwFlags,
     
    4545
    4646typedef BOOL   (* WIN32API PFNDRVCANCELIO)(LPVOID lpDriverData, HANDLE hDevice, DWORD dwFlags, PVOID lpHandleData);
    47 typedef DWORD  (* WIN32API PFNDRVGETOVERLAPPEDRESULT)(LPVOID        lpDriverData, 
     47typedef DWORD  (* WIN32API PFNDRVGETOVERLAPPEDRESULT)(LPVOID        lpDriverData,
    4848                                                      HANDLE        hDevice,
    4949                                                      DWORD         dwFlags,
     
    5353                                                      LPVOID        lpHandleData);
    5454
    55 BOOL WIN32API RegisterCustomDriver(PFNDRVOPEN pfnDriverOpen, PFNDRVCLOSE pfnDriverClose, 
     55BOOL WIN32API RegisterCustomDriver(PFNDRVOPEN pfnDriverOpen, PFNDRVCLOSE pfnDriverClose,
    5656                                   PFNDRVIOCTL pfnDriverIOCtl, PFNDRVREAD pfnDriverRead,
    5757                                   PFNDRVWRITE pfnDriverWrite, PFNDRVCANCELIO pfnDriverCancelIo,
     
    9595void WIN32API SetFixedWaveBufferSize();
    9696
    97 //Override shared semaphore name used to synchronize global window handle 
     97//Override shared semaphore name used to synchronize global window handle
    9898//array access (to avoid name clash with Odin)
    9999void WIN32API SetCustomWndHandleSemName(LPSTR pszSemName);
    100100
    101 //Override shared semaphore name used to synchronize global memory map 
     101//Override shared semaphore name used to synchronize global memory map
    102102//list access (to avoid name clash with Odin)
    103103void WIN32API SetCustomMMapSemName(LPSTR pszSemName);
     
    130130void WIN32API EnablePhysicalDiskAccess(BOOL fEnable);
    131131
    132 //Override a system color without forcing a desktop repaint (which 
     132//Override a system color without forcing a desktop repaint (which
    133133//SetSysColors does)
    134134BOOL WIN32API ODIN_SetSysColors(INT nChanges, const INT *lpSysColor,
     
    147147void WIN32API ODIN_DisableLXDllLoading();
    148148
     149/**
     150 * LoadLibrary*() callback function registered using ODIN_SetLxDllLoadCallback().
     151 * This is called for all LX modules which are loaded by LoadLibrary.
     152 *
     153 * @returns TRUE loading should succeed. The DLL is now registered.
     154 * @returns FALSE loading should fail.
     155 * @param   hmodOS2     The OS/2 module handle.
     156 * @param   hInstance   The Odin instance handle.
     157 *                      If not NULL this means that the DLL is registered.
     158 */
     159typedef BOOL (* WIN32API PFNLXDLLLOAD)(HMODULE hmodOS2, HINSTANCE hInstance);
     160
     161/** Custombuild API for registering a callback for LX Dll loading thru LoadLibrary*(). */
     162BOOL WIN32API ODIN_SetLxDllLoadCallback(PFNLXDLLLOAD pfn);
     163
     164/**
     165 * FreeLibrary*() callback function registered using ODIN_SetLxDllUnLoadCallback().
     166 * This is called when an LX which was previously loaded using LoadLibrary*() is
     167 * finally freed from Odin. The callback servers mainly the purpose of cleaning
     168 * up any data associated with the DLL.
     169 *
     170 * It is called *AFTER* the module is freed from Odin but before it's actually
     171 * unloaded from the OS/2 process. This means that the OS/2 handle is valid while
     172 * the Odin handle is invalid.
     173 *
     174 * @param   hmodOS2     The OS/2 module handle.
     175 * @param   hInstance   The Odin instance handle (invalid!).
     176 * @remark  It likely that this callback will be called for more DLLs than the
     177 *          load callback. Do check handles properly.
     178 */
     179typedef void (* WIN32API PFNLXDLLUNLOAD)(HMODULE hmodOS2, HINSTANCE hInstance);
     180
     181BOOL WIN32API ODIN_SetLxDllUnLoadCallback(PFNLXDLLUNLOAD pfn);
     182
    149183
    150184//******************************************************************************
     
    155189BOOL    WIN32API ODIN_SetDllLoadCallback(ODINPROC_DLLLOAD pfnMyDllLoad);
    156190
     191
    157192//******************************************************************************
    158193// ODIN_SetProcAddress: Override a dll export
    159 // 
     194//
    160195// Parameters:
    161196//      HMODULE hModule         Module handle
     
    171206//******************************************************************************
    172207// ODIN_SetTIBSwitch: override TIB switching
    173 // 
     208//
    174209// Parameters:
    175210//      BOOL fSwitchTIB
Note: See TracChangeset for help on using the changeset viewer.