VirtualBox

Changeset 85121 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jul 8, 2020 7:33:26 PM (5 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h: Refactored the typedef use of DECLCALLBACK as well as DECLCALLBACKMEMBER to wrap the whole expression, similar to the DECLR?CALLBACKMEMBER macros. This allows adding a throw() at the end when compiling with the VC++ compiler to indicate that the callbacks won't throw anything, so we can stop supressing the C5039 warning about passing functions that can potential throw C++ exceptions to extern C code that can't necessarily cope with such (unwind,++). Introduced a few _EX variations that allows specifying different/no calling convention too, as that's handy when dynamically resolving host APIs. Fixed numerous places missing DECLCALLBACK and such. Left two angry @todos regarding use of CreateThread. bugref:9794

Location:
trunk/src/VBox/Additions
Files:
38 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/3D/win/include/VBoxGaDriver.h

    r83832 r85121  
    3939    void *pvEnv;
    4040    /* The callbacks to use by the driver. */
    41     DECLCALLBACKMEMBER(uint32_t, pfnContextCreate)(void *pvEnv,
     41    DECLCALLBACKMEMBER(uint32_t, pfnContextCreate,(void *pvEnv,
    4242                                                   boolean extended,
    43                                                    boolean vgpu10);
    44     DECLCALLBACKMEMBER(void, pfnContextDestroy)(void *pvEnv,
    45                                                 uint32_t u32Cid);
    46     DECLCALLBACKMEMBER(int, pfnSurfaceDefine)(void *pvEnv,
     43                                                   boolean vgpu10));
     44    DECLCALLBACKMEMBER(void, pfnContextDestroy,(void *pvEnv,
     45                                                uint32_t u32Cid));
     46    DECLCALLBACKMEMBER(int, pfnSurfaceDefine,(void *pvEnv,
    4747                                              GASURFCREATE *pCreateParms,
    4848                                              GASURFSIZE *paSizes,
    4949                                              uint32_t cSizes,
    50                                               uint32_t *pu32Sid);
    51     DECLCALLBACKMEMBER(void, pfnSurfaceDestroy)(void *pvEnv,
    52                                                 uint32_t u32Sid);
    53     DECLCALLBACKMEMBER(int, pfnRender)(void *pvEnv,
     50                                              uint32_t *pu32Sid));
     51    DECLCALLBACKMEMBER(void, pfnSurfaceDestroy,(void *pvEnv,
     52                                                uint32_t u32Sid));
     53    DECLCALLBACKMEMBER(int, pfnRender,(void *pvEnv,
    5454                                       uint32_t u32Cid,
    5555                                       void *pvCommands,
    5656                                       uint32_t cbCommands,
    57                                        GAFENCEQUERY *pFenceQuery);
    58     DECLCALLBACKMEMBER(void, pfnFenceUnref)(void *pvEnv,
    59                                             uint32_t u32FenceHandle);
    60     DECLCALLBACKMEMBER(int, pfnFenceQuery)(void *pvEnv,
     57                                       GAFENCEQUERY *pFenceQuery));
     58    DECLCALLBACKMEMBER(void, pfnFenceUnref,(void *pvEnv,
     59                                            uint32_t u32FenceHandle));
     60    DECLCALLBACKMEMBER(int, pfnFenceQuery,(void *pvEnv,
    6161                                           uint32_t u32FenceHandle,
    62                                            GAFENCEQUERY *pFenceQuery);
    63     DECLCALLBACKMEMBER(int, pfnFenceWait)(void *pvEnv,
     62                                           GAFENCEQUERY *pFenceQuery));
     63    DECLCALLBACKMEMBER(int, pfnFenceWait,(void *pvEnv,
    6464                                          uint32_t u32FenceHandle,
    65                                           uint32_t u32TimeoutUS);
    66     DECLCALLBACKMEMBER(int, pfnRegionCreate)(void *pvEnv,
     65                                          uint32_t u32TimeoutUS));
     66    DECLCALLBACKMEMBER(int, pfnRegionCreate,(void *pvEnv,
    6767                                             uint32_t u32RegionSize,
    6868                                             uint32_t *pu32GmrId,
    69                                              void **ppvMap);
    70     DECLCALLBACKMEMBER(void, pfnRegionDestroy)(void *pvEnv,
     69                                             void **ppvMap));
     70    DECLCALLBACKMEMBER(void, pfnRegionDestroy,(void *pvEnv,
    7171                                               uint32_t u32GmrId,
    72                                                void *pvMap);
     72                                               void *pvMap));
    7373} WDDMGalliumDriverEnv;
    7474
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoIOCTL.h

    r82968 r85121  
    6969
    7070/** Complete host commands addressed to the display */
    71 typedef DECLCALLBACK(void) FNVBOXVIDEOHGSMICOMPLETION(HVBOXVIDEOHGSMI hHGSMI, struct VBVAHOSTCMD RT_UNTRUSTED_VOLATILE_HOST * pCmd);
     71typedef DECLCALLBACKTYPE(void, FNVBOXVIDEOHGSMICOMPLETION,(HVBOXVIDEOHGSMI hHGSMI,
     72                                                           struct VBVAHOSTCMD RT_UNTRUSTED_VOLATILE_HOST * pCmd));
    7273typedef FNVBOXVIDEOHGSMICOMPLETION *PFNVBOXVIDEOHGSMICOMPLETION;
    7374
    7475/** request the host commands addressed to the display */
    75 typedef DECLCALLBACK(int) FNVBOXVIDEOHGSMICOMMANDS(HVBOXVIDEOHGSMI hHGSMI, uint8_t u8Channel, uint32_t iDevice,
    76                                                    struct VBVAHOSTCMD RT_UNTRUSTED_VOLATILE_HOST ** ppCmd);
     76typedef DECLCALLBACKTYPE(int, FNVBOXVIDEOHGSMICOMMANDS,(HVBOXVIDEOHGSMI hHGSMI, uint8_t u8Channel, uint32_t iDevice,
     77                                                        struct VBVAHOSTCMD RT_UNTRUSTED_VOLATILE_HOST ** ppCmd));
    7778typedef FNVBOXVIDEOHGSMICOMMANDS *PFNVBOXVIDEOHGSMICOMMANDS;
    7879
    7980/** post guest command (offset) to the host */
    80 typedef DECLCALLBACK(void) FNVBOXVIDEOHGSMIPOSTCOMMAND(HVBOXVIDEOHGSMI hHGSMI, HGSMIOFFSET offCmd);
     81typedef DECLCALLBACKTYPE(void, FNVBOXVIDEOHGSMIPOSTCOMMAND,(HVBOXVIDEOHGSMI hHGSMI, HGSMIOFFSET offCmd));
    8182typedef FNVBOXVIDEOHGSMIPOSTCOMMAND *PFNVBOXVIDEOHGSMIPOSTCOMMAND;
    8283
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp

    r83827 r85121  
    133133} VBOXVDBG_DUMP_INFO, *PVBOXVDBG_DUMP_INFO;
    134134
    135 typedef DECLCALLBACK(void) FNVBOXVDBG_CONTENTS_DUMPER(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper);
     135typedef DECLCALLBACKTYPE(void, FNVBOXVDBG_CONTENTS_DUMPER,(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper));
    136136typedef FNVBOXVDBG_CONTENTS_DUMPER *PFNVBOXVDBG_CONTENTS_DUMPER;
    137137
     
    588588}
    589589
    590 static VOID CALLBACK vboxVDbgTimerCb(__in PVOID lpParameter, __in BOOLEAN TimerOrWaitFired)
     590static VOID CALLBACK vboxVDbgTimerCb(__in PVOID lpParameter, __in BOOLEAN TimerOrWaitFired) RT_NOTHROW_DEF
    591591{
    592592    RT_NOREF(lpParameter, TimerOrWaitFired);
     
    688688}
    689689
    690 LONG WINAPI vboxVDbgVectoredHandler(struct _EXCEPTION_POINTERS *pExceptionInfo)
     690static LONG WINAPI vboxVDbgVectoredHandler(struct _EXCEPTION_POINTERS *pExceptionInfo) RT_NOTHROW_DEF
    691691{
    692692    static volatile bool g_fAllowIgnore = true; /* Might be changed in kernel debugger. */
     
    721721{
    722722    Assert(!g_VBoxWDbgVEHandler);
    723     g_VBoxWDbgVEHandler = AddVectoredExceptionHandler(1,vboxVDbgVectoredHandler);
     723    g_VBoxWDbgVEHandler = AddVectoredExceptionHandler(1, vboxVDbgVectoredHandler);
    724724    Assert(g_VBoxWDbgVEHandler);
    725725
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/shared/VBoxDispKmt.cpp

    r82968 r85121  
    5353        bool bSupportedWin8 = true;
    5454        pCallbacks->pfnD3DKMTOpenAdapterFromHdc = (PFND3DKMT_OPENADAPTERFROMHDC)GetProcAddress(pCallbacks->hGdi32, "D3DKMTOpenAdapterFromHdc");
    55         LogFunc(("pfnD3DKMTOpenAdapterFromHdc = %p\n", pCallbacks->pfnD3DKMTOpenAdapterFromHdc));
     55        LogFunc(("pfnD3DKMTOpenAdapterFromHdc = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTOpenAdapterFromHdc)));
    5656        bSupported &= !!(pCallbacks->pfnD3DKMTOpenAdapterFromHdc);
    5757
    5858        pCallbacks->pfnD3DKMTOpenAdapterFromGdiDisplayName = (PFND3DKMT_OPENADAPTERFROMGDIDISPLAYNAME)GetProcAddress(pCallbacks->hGdi32, "D3DKMTOpenAdapterFromGdiDisplayName");
    59         LogFunc(("pfnD3DKMTOpenAdapterFromGdiDisplayName = %p\n", pCallbacks->pfnD3DKMTOpenAdapterFromGdiDisplayName));
     59        LogFunc(("pfnD3DKMTOpenAdapterFromGdiDisplayName = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTOpenAdapterFromGdiDisplayName)));
    6060        bSupported &= !!(pCallbacks->pfnD3DKMTOpenAdapterFromGdiDisplayName);
    6161
    6262        pCallbacks->pfnD3DKMTCloseAdapter = (PFND3DKMT_CLOSEADAPTER)GetProcAddress(pCallbacks->hGdi32, "D3DKMTCloseAdapter");
    63         LogFunc(("pfnD3DKMTCloseAdapter = %p\n", pCallbacks->pfnD3DKMTCloseAdapter));
     63        LogFunc(("pfnD3DKMTCloseAdapter = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTCloseAdapter)));
    6464        bSupported &= !!(pCallbacks->pfnD3DKMTCloseAdapter);
    6565
    6666        pCallbacks->pfnD3DKMTEscape = (PFND3DKMT_ESCAPE)GetProcAddress(pCallbacks->hGdi32, "D3DKMTEscape");
    67         LogFunc(("pfnD3DKMTEscape = %p\n", pCallbacks->pfnD3DKMTEscape));
     67        LogFunc(("pfnD3DKMTEscape = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTEscape)));
    6868        bSupported &= !!(pCallbacks->pfnD3DKMTEscape);
    6969
    7070        pCallbacks->pfnD3DKMTQueryAdapterInfo = (PFND3DKMT_QUERYADAPTERINFO)GetProcAddress(pCallbacks->hGdi32, "D3DKMTQueryAdapterInfo");
    71         LogFunc(("pfnD3DKMTQueryAdapterInfo = %p\n", pCallbacks->pfnD3DKMTQueryAdapterInfo));
     71        LogFunc(("pfnD3DKMTQueryAdapterInfo = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTQueryAdapterInfo)));
    7272        bSupported &= !!(pCallbacks->pfnD3DKMTQueryAdapterInfo);
    7373
    74                 pCallbacks->pfnD3DKMTCreateDevice = (PFND3DKMT_CREATEDEVICE)GetProcAddress(pCallbacks->hGdi32, "D3DKMTCreateDevice");
    75         LogFunc(("pfnD3DKMTCreateDevice = %p\n", pCallbacks->pfnD3DKMTCreateDevice));
     74        pCallbacks->pfnD3DKMTCreateDevice = (PFND3DKMT_CREATEDEVICE)GetProcAddress(pCallbacks->hGdi32, "D3DKMTCreateDevice");
     75        LogFunc(("pfnD3DKMTCreateDevice = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTCreateDevice)));
    7676        bSupported &= !!(pCallbacks->pfnD3DKMTCreateDevice);
    7777
    7878        pCallbacks->pfnD3DKMTDestroyDevice = (PFND3DKMT_DESTROYDEVICE)GetProcAddress(pCallbacks->hGdi32, "D3DKMTDestroyDevice");
    79         LogFunc(("pfnD3DKMTDestroyDevice = %p\n", pCallbacks->pfnD3DKMTDestroyDevice));
     79        LogFunc(("pfnD3DKMTDestroyDevice = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTDestroyDevice)));
    8080        bSupported &= !!(pCallbacks->pfnD3DKMTDestroyDevice);
    8181
    8282        pCallbacks->pfnD3DKMTCreateContext = (PFND3DKMT_CREATECONTEXT)GetProcAddress(pCallbacks->hGdi32, "D3DKMTCreateContext");
    83         LogFunc(("pfnD3DKMTCreateContext = %p\n", pCallbacks->pfnD3DKMTCreateContext));
     83        LogFunc(("pfnD3DKMTCreateContext = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTCreateContext)));
    8484        bSupported &= !!(pCallbacks->pfnD3DKMTCreateContext);
    8585
    8686        pCallbacks->pfnD3DKMTDestroyContext = (PFND3DKMT_DESTROYCONTEXT)GetProcAddress(pCallbacks->hGdi32, "D3DKMTDestroyContext");
    87         LogFunc(("pfnD3DKMTDestroyContext = %p\n", pCallbacks->pfnD3DKMTDestroyContext));
     87        LogFunc(("pfnD3DKMTDestroyContext = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTDestroyContext)));
    8888        bSupported &= !!(pCallbacks->pfnD3DKMTDestroyContext);
    8989
    9090        pCallbacks->pfnD3DKMTRender = (PFND3DKMT_RENDER)GetProcAddress(pCallbacks->hGdi32, "D3DKMTRender");
    91         LogFunc(("pfnD3DKMTRender = %p\n", pCallbacks->pfnD3DKMTRender));
     91        LogFunc(("pfnD3DKMTRender = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTRender)));
    9292        bSupported &= !!(pCallbacks->pfnD3DKMTRender);
    9393
    9494        pCallbacks->pfnD3DKMTCreateAllocation = (PFND3DKMT_CREATEALLOCATION)GetProcAddress(pCallbacks->hGdi32, "D3DKMTCreateAllocation");
    95         LogFunc(("pfnD3DKMTCreateAllocation = %p\n", pCallbacks->pfnD3DKMTCreateAllocation));
     95        LogFunc(("pfnD3DKMTCreateAllocation = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTCreateAllocation)));
    9696        bSupported &= !!(pCallbacks->pfnD3DKMTCreateAllocation);
    9797
    9898        pCallbacks->pfnD3DKMTDestroyAllocation = (PFND3DKMT_DESTROYALLOCATION)GetProcAddress(pCallbacks->hGdi32, "D3DKMTDestroyAllocation");
    99         LogFunc(("pfnD3DKMTDestroyAllocation = %p\n", pCallbacks->pfnD3DKMTDestroyAllocation));
     99        LogFunc(("pfnD3DKMTDestroyAllocation = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTDestroyAllocation)));
    100100        bSupported &= !!(pCallbacks->pfnD3DKMTDestroyAllocation);
    101101
    102102        pCallbacks->pfnD3DKMTLock = (PFND3DKMT_LOCK)GetProcAddress(pCallbacks->hGdi32, "D3DKMTLock");
    103         LogFunc(("pfnD3DKMTLock = %p\n", pCallbacks->pfnD3DKMTLock));
     103        LogFunc(("pfnD3DKMTLock = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTLock)));
    104104        bSupported &= !!(pCallbacks->pfnD3DKMTLock);
    105105
    106106        pCallbacks->pfnD3DKMTUnlock = (PFND3DKMT_UNLOCK)GetProcAddress(pCallbacks->hGdi32, "D3DKMTUnlock");
    107         LogFunc(("pfnD3DKMTUnlock = %p\n", pCallbacks->pfnD3DKMTUnlock));
     107        LogFunc(("pfnD3DKMTUnlock = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTUnlock)));
    108108        bSupported &= !!(pCallbacks->pfnD3DKMTUnlock);
    109109
    110110        pCallbacks->pfnD3DKMTInvalidateActiveVidPn = (PFND3DKMT_INVALIDATEACTIVEVIDPN)GetProcAddress(pCallbacks->hGdi32, "D3DKMTInvalidateActiveVidPn");
    111         LogFunc(("pfnD3DKMTInvalidateActiveVidPn = %p\n", pCallbacks->pfnD3DKMTInvalidateActiveVidPn));
     111        LogFunc(("pfnD3DKMTInvalidateActiveVidPn = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTInvalidateActiveVidPn)));
    112112        bSupported &= !!(pCallbacks->pfnD3DKMTInvalidateActiveVidPn);
    113113
    114114        pCallbacks->pfnD3DKMTPollDisplayChildren = (PFND3DKMT_POLLDISPLAYCHILDREN)GetProcAddress(pCallbacks->hGdi32, "D3DKMTPollDisplayChildren");
    115         LogFunc(("pfnD3DKMTPollDisplayChildren = %p\n", pCallbacks->pfnD3DKMTPollDisplayChildren));
     115        LogFunc(("pfnD3DKMTPollDisplayChildren = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTPollDisplayChildren)));
    116116        bSupported &= !!(pCallbacks->pfnD3DKMTPollDisplayChildren);
    117117
    118118        pCallbacks->pfnD3DKMTEnumAdapters = (PFND3DKMT_ENUMADAPTERS)GetProcAddress(pCallbacks->hGdi32, "D3DKMTEnumAdapters");
    119         LogFunc(("pfnD3DKMTEnumAdapters = %p\n", pCallbacks->pfnD3DKMTEnumAdapters));
     119        LogFunc(("pfnD3DKMTEnumAdapters = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTEnumAdapters)));
    120120        /* this present starting win8 release preview only, so keep going if it is not available,
    121121         * i.e. do not clear the bSupported on its absence */
     
    123123
    124124        pCallbacks->pfnD3DKMTOpenAdapterFromLuid = (PFND3DKMT_OPENADAPTERFROMLUID)GetProcAddress(pCallbacks->hGdi32, "D3DKMTOpenAdapterFromLuid");
    125         LogFunc(("pfnD3DKMTOpenAdapterFromLuid = %p\n", pCallbacks->pfnD3DKMTOpenAdapterFromLuid));
     125        LogFunc(("pfnD3DKMTOpenAdapterFromLuid = %p\n", RT_CB_LOG_CAST(pCallbacks->pfnD3DKMTOpenAdapterFromLuid)));
    126126        /* this present starting win8 release preview only, so keep going if it is not available,
    127127         * i.e. do not clear the bSupported on its absence */
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/shared/VBoxDispKmt.h

    r82968 r85121  
    4343} D3DKMT_ENUMADAPTERS;
    4444
    45 typedef NTSTATUS (APIENTRY *PFND3DKMT_ENUMADAPTERS)(IN OUT D3DKMT_ENUMADAPTERS*);
     45typedef DECLCALLBACKPTR_EX(NTSTATUS, APIENTRY, PFND3DKMT_ENUMADAPTERS,(IN OUT D3DKMT_ENUMADAPTERS *));
    4646
    4747typedef struct _D3DKMT_OPENADAPTERFROMLUID
     
    5151} D3DKMT_OPENADAPTERFROMLUID;
    5252
    53 typedef NTSTATUS (APIENTRY *PFND3DKMT_OPENADAPTERFROMLUID)(IN OUT D3DKMT_OPENADAPTERFROMLUID*);
     53typedef DECLCALLBACKPTR_EX(NTSTATUS, APIENTRY, PFND3DKMT_OPENADAPTERFROMLUID,(IN OUT D3DKMT_OPENADAPTERFROMLUID *));
    5454/* END OF win8 release preview-specific stuff */
    5555
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispVHWA.h

    r82968 r85121  
    6262}VBOXVHWASURFDESC, *PVBOXVHWASURFDESC;
    6363
    64 typedef DECLCALLBACK(void) FNVBOXVHWACMDCOMPLETION(PVBOXDISPDEV pDev, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST *pCmd, void *pvContext);
     64typedef DECLCALLBACKTYPE(void, FNVBOXVHWACMDCOMPLETION,(PVBOXDISPDEV pDev, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST *pCmd,
     65                                                        void *pvContext));
    6566typedef FNVBOXVHWACMDCOMPLETION *PFNVBOXVHWACMDCOMPLETION;
    6667
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPCm.cpp

    r82968 r85121  
    3535} VBOXVIDEOCM_CMD_CTL_KM_TYPE;
    3636
    37 typedef DECLCALLBACK(VOID) FNVBOXVIDEOCM_CMD_CB(PVBOXVIDEOCM_CTX pContext, struct VBOXVIDEOCM_CMD_CTL_KM *pCmd, PVOID pvContext);
     37typedef DECLCALLBACKTYPE(VOID, FNVBOXVIDEOCM_CMD_CB,(PVBOXVIDEOCM_CTX pContext, struct VBOXVIDEOCM_CMD_CTL_KM *pCmd,
     38                                                     PVOID pvContext));
    3839typedef FNVBOXVIDEOCM_CMD_CB *PFNVBOXVIDEOCM_CMD_CB;
    3940
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPCm.h

    r82968 r85121  
    5555#define VBOXVIDEOCMCMDVISITOR_RETURN_BREAK    0x00000001
    5656#define VBOXVIDEOCMCMDVISITOR_RETURN_RMCMD    0x00000002
    57 typedef DECLCALLBACK(UINT) FNVBOXVIDEOCMCMDVISITOR(PVBOXVIDEOCM_CTX pContext, PVOID pvCmd, uint32_t cbCmd, PVOID pvVisitor);
     57typedef DECLCALLBACKTYPE(UINT, FNVBOXVIDEOCMCMDVISITOR,(PVBOXVIDEOCM_CTX pContext, PVOID pvCmd, uint32_t cbCmd, PVOID pvVisitor));
    5858typedef FNVBOXVIDEOCMCMDVISITOR *PFNVBOXVIDEOCMCMDVISITOR;
    5959NTSTATUS vboxVideoCmCmdVisit(PVBOXVIDEOCM_CTX pContext, BOOLEAN bEntireSession, PFNVBOXVIDEOCMCMDVISITOR pfnVisitor, PVOID pvVisitor);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPLegacy.cpp

    r83840 r85121  
    5252
    5353typedef struct VBOXVDMADDI_CMD *PVBOXVDMADDI_CMD;
    54 typedef DECLCALLBACK(VOID) FNVBOXVDMADDICMDCOMPLETE_DPC(PVBOXMP_DEVEXT pDevExt, PVBOXVDMADDI_CMD pCmd, PVOID pvContext);
     54typedef DECLCALLBACKTYPE(VOID, FNVBOXVDMADDICMDCOMPLETE_DPC,(PVBOXMP_DEVEXT pDevExt, PVBOXVDMADDI_CMD pCmd, PVOID pvContext));
    5555typedef FNVBOXVDMADDICMDCOMPLETE_DPC *PFNVBOXVDMADDICMDCOMPLETE_DPC;
    5656
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPShgsmi.h

    r82968 r85121  
    3333} VBOXSHGSMI, *PVBOXSHGSMI;
    3434
    35 typedef DECLCALLBACK(void) FNVBOXSHGSMICMDCOMPLETION(PVBOXSHGSMI pHeap, void RT_UNTRUSTED_VOLATILE_HOST *pvCmd, void *pvContext);
     35typedef DECLCALLBACKTYPE(void, FNVBOXSHGSMICMDCOMPLETION,(PVBOXSHGSMI pHeap, void RT_UNTRUSTED_VOLATILE_HOST *pvCmd, void *pvContext));
    3636typedef FNVBOXSHGSMICMDCOMPLETION *PFNVBOXSHGSMICMDCOMPLETION;
    3737
    38 typedef DECLCALLBACK(PFNVBOXSHGSMICMDCOMPLETION) FNVBOXSHGSMICMDCOMPLETION_IRQ(PVBOXSHGSMI pHeap,
    39                                                                                void RT_UNTRUSTED_VOLATILE_HOST *pvCmd,
    40                                                                                void *pvContext, void **ppvCompletion);
     38typedef DECLCALLBACKTYPE(PFNVBOXSHGSMICMDCOMPLETION, FNVBOXSHGSMICMDCOMPLETION_IRQ,(PVBOXSHGSMI pHeap,
     39                                                                                    void RT_UNTRUSTED_VOLATILE_HOST *pvCmd,
     40                                                                                    void *pvContext, void **ppvCompletion));
    4141typedef FNVBOXSHGSMICMDCOMPLETION_IRQ *PFNVBOXSHGSMICMDCOMPLETION_IRQ;
    4242
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVhwa.h

    r82968 r85121  
    3535void vboxVhwaCommandSubmitAsynchAndComplete(PVBOXMP_DEVEXT pDevExt, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST *pCmd);
    3636
    37 typedef DECLCALLBACK(void) FNVBOXVHWACMDCOMPLETION(PVBOXMP_DEVEXT pDevExt, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST * pCmd,
    38                                                    void *pvContext);
     37typedef DECLCALLBACKTYPE(void, FNVBOXVHWACMDCOMPLETION,(PVBOXMP_DEVEXT pDevExt, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST *pCmd,
     38                                                        void *pvContext));
    3939typedef FNVBOXVHWACMDCOMPLETION *PFNVBOXVHWACMDCOMPLETION;
    4040
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVidPn.h

    r82968 r85121  
    5353
    5454/* !!!NOTE: The callback is responsible for releasing the path */
    55 typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMPATHS(D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
    56         const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo, PVOID pContext);
     55typedef DECLCALLBACKTYPE(BOOLEAN, FNVBOXVIDPNENUMPATHS,(D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology,
     56                                                        const DXGK_VIDPNTOPOLOGY_INTERFACE *pVidPnTopologyInterface,
     57                                                        const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo,
     58                                                        PVOID pContext));
    5759typedef FNVBOXVIDPNENUMPATHS *PFNVBOXVIDPNENUMPATHS;
    5860
    5961/* !!!NOTE: The callback is responsible for releasing the source mode info */
    60 typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMSOURCEMODES(D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
    61         const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext);
     62typedef DECLCALLBACKTYPE(BOOLEAN, FNVBOXVIDPNENUMSOURCEMODES,(D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet,
     63                                                              const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
     64                                                              const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo,
     65                                                              PVOID pContext));
    6266typedef FNVBOXVIDPNENUMSOURCEMODES *PFNVBOXVIDPNENUMSOURCEMODES;
    6367
    6468/* !!!NOTE: The callback is responsible for releasing the target mode info */
    65 typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMTARGETMODES(D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
    66         const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext);
     69typedef DECLCALLBACKTYPE(BOOLEAN, FNVBOXVIDPNENUMTARGETMODES,(D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet,
     70                                                              const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
     71                                                              const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo,
     72                                                              PVOID pContext));
    6773typedef FNVBOXVIDPNENUMTARGETMODES *PFNVBOXVIDPNENUMTARGETMODES;
    6874
    6975/* !!!NOTE: The callback is responsible for releasing the source mode info */
    70 typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMMONITORSOURCEMODES(D3DKMDT_HMONITORSOURCEMODESET hMonitorSMS, CONST DXGK_MONITORSOURCEMODESET_INTERFACE *pMonitorSMSIf,
    71         CONST D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSMI, PVOID pContext);
     76typedef DECLCALLBACKTYPE(BOOLEAN, FNVBOXVIDPNENUMMONITORSOURCEMODES,(D3DKMDT_HMONITORSOURCEMODESET hMonitorSMS,
     77                                                                     CONST DXGK_MONITORSOURCEMODESET_INTERFACE *pMonitorSMSIf,
     78                                                                     CONST D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSMI,
     79                                                                     PVOID pContext));
    7280typedef FNVBOXVIDPNENUMMONITORSOURCEMODES *PFNVBOXVIDPNENUMMONITORSOURCEMODES;
    7381
    74 typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMTARGETSFORSOURCE(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
    75         CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId, SIZE_T cTgtPaths, PVOID pContext);
     82typedef DECLCALLBACKTYPE(BOOLEAN, FNVBOXVIDPNENUMTARGETSFORSOURCE,(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology,
     83                                                                   const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
     84                                                                   CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId,
     85                                                                   D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId,
     86                                                                   SIZE_T cTgtPaths, PVOID pContext));
    7687typedef FNVBOXVIDPNENUMTARGETSFORSOURCE *PFNVBOXVIDPNENUMTARGETSFORSOURCE;
    7788
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/Svga.h

    r83578 r85121  
    126126
    127127typedef struct SVGAHOSTOBJECT SVGAHOSTOBJECT;
    128 typedef DECLCALLBACK(NTSTATUS) FNHostObjectDestroy(SVGAHOSTOBJECT *pThis);
     128typedef DECLCALLBACKTYPE(NTSTATUS, FNHostObjectDestroy,(SVGAHOSTOBJECT *pThis));
    129129typedef FNHostObjectDestroy *PFNHostObjectDestroy;
    130130
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp

    r83826 r85121  
    399399                                                     UINT Notification,
    400400                                                     UINT_PTR Param1,
    401                                                      UINT_PTR Param2)
     401                                                     UINT_PTR Param2) RT_NOTHROW_DEF
    402402{
    403403#ifdef DEBUG
  • trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvPoller.cpp

    r82968 r85121  
    3232
    3333
    34 VBoxCredProvPoller::VBoxCredProvPoller(void) :
    35     m_hThreadPoller(NIL_RTTHREAD),
    36     m_pProv(NULL)
     34VBoxCredProvPoller::VBoxCredProvPoller(void)
     35    : m_hThreadPoller(NIL_RTTHREAD)
     36    , m_pProv(NULL)
    3737{
    3838}
     
    146146    return VINF_SUCCESS;
    147147}
    148 
  • trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvProvider.cpp

    r83824 r85121  
    2323
    2424#include <iprt/win/windows.h>
    25 #include <credentialprovider.h>
     25#include <iprt/win/credentialprovider.h>
    2626
    2727#include <iprt/errcore.h>
  • trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvProvider.h

    r82968 r85121  
    2222#endif
    2323
    24 #include <credentialprovider.h>
     24#include <iprt/win/credentialprovider.h>
    2525#include <iprt/win/windows.h>
    2626#include <strsafe.h>
  • trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredentialProvider.h

    r82968 r85121  
    2323
    2424#include <iprt/win/windows.h>
    25 #include <credentialprovider.h>
     25#include <iprt/win/credentialprovider.h>
    2626#include <Shlguid.h>
    2727
  • trunk/src/VBox/Additions/WINNT/VBoxHook/VBoxHook.cpp

    r82968 r85121  
    5454static void CALLBACK VBoxHandleWinEvent(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd,
    5555                                        LONG idObject, LONG idChild,
    56                                         DWORD dwEventThread, DWORD dwmsEventTime)
     56                                        DWORD dwEventThread, DWORD dwmsEventTime) RT_NOTHROW_DEF
    5757{
    5858    RT_NOREF(hWinEventHook, idChild, dwEventThread, dwmsEventTime);
     
    109109static void CALLBACK VBoxHandleDesktopEvent(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd,
    110110                                            LONG idObject, LONG idChild,
    111                                             DWORD dwEventThread, DWORD dwmsEventTime)
     111                                            DWORD dwEventThread, DWORD dwmsEventTime) RT_NOTHROW_DEF
    112112{
    113113    RT_NOREF(hWinEventHook, event, hwnd, idObject, idChild, dwEventThread, dwmsEventTime);
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp

    r83823 r85121  
    749749}
    750750
    751 static int vboxClipboardWindowThread(RTTHREAD hThread, void *pvUser)
     751static DECLCALLBACK(int) vboxClipboardWindowThread(RTTHREAD hThread, void *pvUser)
    752752{
    753753    PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pvUser;
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp

    r84728 r85121  
    7272typedef struct _VBOXDISPLAYWDDMAPICONTEXT
    7373{
    74     LONG (WINAPI * pfnSetDisplayConfig)(UINT numPathArrayElements,DISPLAYCONFIG_PATH_INFO *pathArray,UINT numModeInfoArrayElements,
    75                                     DISPLAYCONFIG_MODE_INFO *modeInfoArray, UINT Flags);
    76     LONG (WINAPI * pfnQueryDisplayConfig)(UINT Flags,UINT *pNumPathArrayElements, DISPLAYCONFIG_PATH_INFO *pPathInfoArray,
    77                                       UINT *pNumModeInfoArrayElements, DISPLAYCONFIG_MODE_INFO *pModeInfoArray,
    78                                       DISPLAYCONFIG_TOPOLOGY_ID *pCurrentTopologyId);
    79     LONG (WINAPI * pfnGetDisplayConfigBufferSizes)(UINT Flags, UINT *pNumPathArrayElements, UINT *pNumModeInfoArrayElements);
     74    DECLCALLBACKMEMBER_EX(LONG, WINAPI, pfnSetDisplayConfig,(UINT numPathArrayElements, DISPLAYCONFIG_PATH_INFO *pathArray,
     75                                                             UINT numModeInfoArrayElements,
     76                                                             DISPLAYCONFIG_MODE_INFO *modeInfoArray, UINT Flags));
     77    DECLCALLBACKMEMBER_EX(LONG, WINAPI, pfnQueryDisplayConfig,(UINT Flags, UINT *pNumPathArrayElements,
     78                                                               DISPLAYCONFIG_PATH_INFO *pPathInfoArray,
     79                                                               UINT *pNumModeInfoArrayElements,
     80                                                               DISPLAYCONFIG_MODE_INFO *pModeInfoArray,
     81                                                               DISPLAYCONFIG_TOPOLOGY_ID *pCurrentTopologyId));
     82    DECLCALLBACKMEMBER_EX(LONG, WINAPI, pfnGetDisplayConfigBufferSizes,(UINT Flags, UINT *pNumPathArrayElements,
     83                                                                        UINT *pNumModeInfoArrayElements));
    8084} _VBOXDISPLAYWDDMAPICONTEXT;
    8185
     
    12191223}
    12201224
    1221 static DWORD WINAPI vboxRrRunnerThread(void *pvUser)
     1225/** @todo r=bird: Only the CRT uses CreateThread for creating threading!! */
     1226static DWORD WINAPI vboxRrRunnerThread(void *pvUser) RT_NOTHROW_DEF
    12221227{
    12231228    RT_NOREF(pvUser);
     
    12501255    if (pMon->hEvent)
    12511256    {
     1257        /** @todo r=bird: What kind of stupid nonsense is this?!?
     1258         *  Only the CRT uses CreateThread for creating threading!!
     1259         */
    12521260        pMon->hThread = CreateThread(NULL /* LPSECURITY_ATTRIBUTES lpThreadAttributes */,
    12531261                                              0 /* SIZE_T dwStackSize */,
    1254                                               vboxRrRunnerThread,
    1255                                               pMon,
    1256                                               0 /* DWORD dwCreationFlags */,
    1257                                               &pMon->idThread);
     1262                                     vboxRrRunnerThread,
     1263                                     pMon,
     1264                                     0 /* DWORD dwCreationFlags */,
     1265                                     &pMon->idThread);
    12581266        if (pMon->hThread)
    12591267        {
     
    12611269            if (dwResult == WAIT_OBJECT_0)
    12621270                return S_OK;
    1263             else
    1264             {
    1265                 Log(("WaitForSingleObject failed!"));
    1266                 hr = E_FAIL;
    1267             }
     1271            Log(("WaitForSingleObject failed!"));
     1272            hr = E_FAIL;
    12681273        }
    12691274        else
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.h

    r84728 r85121  
    5858        struct
    5959        {
    60             LONG (WINAPI *pfnChangeDisplaySettingsEx)(LPCSTR lpszDeviceName, LPDEVMODE lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam);
     60            DECLCALLBACKMEMBER_EX(LONG, WINAPI, pfnChangeDisplaySettingsEx,(LPCSTR lpszDeviceName, LPDEVMODE lpDevMode,
     61                                                                            HWND hwnd, DWORD dwflags, LPVOID lParam));
    6162        } xpdm;
    6263#ifdef VBOX_WITH_WDDM
     
    6465        {
    6566            /* ChangeDisplaySettingsEx does not exist in NT. ResizeDisplayDevice uses the function. */
    66             LONG (WINAPI *pfnChangeDisplaySettingsEx)(LPCTSTR lpszDeviceName, LPDEVMODE lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam);
     67            DECLCALLBACKMEMBER_EX(LONG, WINAPI, pfnChangeDisplaySettingsEx,(LPCTSTR lpszDeviceName, LPDEVMODE lpDevMode,
     68                                                                            HWND hwnd, DWORD dwflags, LPVOID lParam));
    6769            /* EnumDisplayDevices does not exist in NT. isVBoxDisplayDriverActive et al. are using these functions. */
    68             BOOL (WINAPI *pfnEnumDisplayDevices)(IN LPCSTR lpDevice, IN DWORD iDevNum, OUT PDISPLAY_DEVICEA lpDisplayDevice, IN DWORD dwFlags);
     70            DECLCALLBACKMEMBER_EX(BOOL, WINAPI, pfnEnumDisplayDevices,(IN LPCSTR lpDevice, IN DWORD iDevNum,
     71                                                                       OUT PDISPLAY_DEVICEA lpDisplayDevice, IN DWORD dwFlags));
    6972
    7073            VBOXDISPKMT_CALLBACKS KmtCallbacks;
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp

    r82968 r85121  
    4949    BOOL fAnyX;
    5050    /** ChangeDisplaySettingsEx does not exist in NT. ResizeDisplayDevice uses the function. */
    51     LONG (WINAPI * pfnChangeDisplaySettingsEx)(LPCTSTR lpszDeviceName, LPDEVMODE lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam);
     51    DECLCALLBACKMEMBER_EX(LONG,WINAPI, pfnChangeDisplaySettingsEx,(LPCTSTR lpszDeviceName, LPDEVMODE lpDevMode, HWND hwnd,
     52                                                                   DWORD dwflags, LPVOID lParam));
    5253    /** EnumDisplayDevices does not exist in NT. isVBoxDisplayDriverActive et al. are using these functions. */
    53     BOOL (WINAPI * pfnEnumDisplayDevices)(IN LPCSTR lpDevice, IN DWORD iDevNum, OUT PDISPLAY_DEVICEA lpDisplayDevice, IN DWORD dwFlags);
     54    DECLCALLBACKMEMBER_EX(BOOL, WINAPI, pfnEnumDisplayDevices,(IN LPCSTR lpDevice, IN DWORD iDevNum,
     55                                                               OUT PDISPLAY_DEVICEA lpDisplayDevice, IN DWORD dwFlags));
    5456    /** Display driver interface, XPDM - WDDM abstraction see VBOXDISPIF** definitions above */
    5557    VBOXDISPIF dispIf;
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp

    r83833 r85121  
    8484*   Internal Functions                                                                                                           *
    8585*********************************************************************************************************************************/
    86 static LRESULT CALLBACK vboxDnDWndProcInstance(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
    87 static LRESULT CALLBACK vboxDnDWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
     86static LRESULT CALLBACK vboxDnDWndProcInstance(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) RT_NOTHROW_PROTO;
     87static LRESULT CALLBACK vboxDnDWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) RT_NOTHROW_PROTO;
    8888
    8989
     
    199199 *                                  is using the thread.
    200200 */
    201 /* static */
    202 int VBoxDnDWnd::Thread(RTTHREAD hThread, void *pvUser)
     201/*static*/ DECLCALLBACK(int) VBoxDnDWnd::Thread(RTTHREAD hThread, void *pvUser)
    203202{
    204203    AssertPtrReturn(pvUser, VERR_INVALID_POINTER);
     
    251250        dwStyle |= WS_VISIBLE; /* Make the window visible. */
    252251#endif
    253         pThis->hWnd =
    254             CreateWindowEx(dwExStyle,
    255                            VBOX_DND_WND_CLASS, VBOX_DND_WND_CLASS,
    256                            dwStyle,
     252        pThis->hWnd = CreateWindowEx(dwExStyle,
     253                                     VBOX_DND_WND_CLASS, VBOX_DND_WND_CLASS,
     254                                     dwStyle,
    257255#ifdef VBOX_DND_DEBUG_WND
    258                            CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, NULL, NULL,
     256                                     CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, NULL, NULL,
    259257#else
    260                            -200, -200, 100, 100, NULL, NULL,
     258                                     -200, -200, 100, 100, NULL, NULL,
    261259#endif
    262                            hInstance, pThis /* lParm */);
     260                                     hInstance, pThis /* lParm */);
    263261        if (!pThis->hWnd)
    264262        {
     
    16251623 * window instances.
    16261624 */
    1627 static LRESULT CALLBACK vboxDnDWndProcInstance(HWND hWnd, UINT uMsg,
    1628                                                WPARAM wParam, LPARAM lParam)
     1625static LRESULT CALLBACK vboxDnDWndProcInstance(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) RT_NOTHROW_DEF
    16291626{
    16301627    LONG_PTR pUserData = GetWindowLongPtr(hWnd, GWLP_USERDATA);
     
    16421639 * proxy window instance.
    16431640 */
    1644 static LRESULT CALLBACK vboxDnDWndProc(HWND hWnd, UINT uMsg,
    1645                                        WPARAM wParam, LPARAM lParam)
     1641static LRESULT CALLBACK vboxDnDWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) RT_NOTHROW_DEF
    16461642{
    16471643    /* Note: WM_NCCREATE is not the first ever message which arrives, but
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.h

    r83833 r85121  
    313313public:
    314314
    315     /** The window's thread for the native message pump and
    316      *  OLE context. */
    317     static int Thread(RTTHREAD hThread, void *pvUser);
     315    /** The window's thread for the native message pump and OLE context. */
     316    static DECLCALLBACK(int) Thread(RTTHREAD hThread, void *pvUser);
    318317
    319318public:
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSeamless.cpp

    r82968 r85121  
    195195}
    196196
    197 BOOL CALLBACK VBoxEnumFunc(HWND hwnd, LPARAM lParam)
     197BOOL CALLBACK VBoxEnumFunc(HWND hwnd, LPARAM lParam) RT_NOTHROW_DEF
    198198{
    199199    PVBOX_ENUM_PARAM    lpParam = (PVBOX_ENUM_PARAM)lParam;
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp

    r84721 r85121  
    497497 * @param   pfnLog
    498498 */
    499 static void vboxTrayLogHeaderFooter(PRTLOGGER pLoggerRelease, RTLOGPHASE enmPhase, PFNRTLOGPHASEMSG pfnLog)
     499static DECLCALLBACK(void) vboxTrayLogHeaderFooter(PRTLOGGER pLoggerRelease, RTLOGPHASE enmPhase, PFNRTLOGPHASEMSG pfnLog)
    500500{
    501501    /* Some introductory information. */
     
    726726            *(void **)&pfnConvertStringSecurityDescriptorToSecurityDescriptorA =
    727727                RTLdrGetSystemSymbol("advapi32.dll", "ConvertStringSecurityDescriptorToSecurityDescriptorA");
    728             Log(("pfnConvertStringSecurityDescriptorToSecurityDescriptorA = %x\n", pfnConvertStringSecurityDescriptorToSecurityDescriptorA));
     728            Log(("pfnConvertStringSecurityDescriptorToSecurityDescriptorA = %p\n",
     729                 RT_CB_LOG_CAST(pfnConvertStringSecurityDescriptorToSecurityDescriptorA)));
    729730            if (pfnConvertStringSecurityDescriptorToSecurityDescriptorA)
    730731            {
     
    16751676struct VBOXCAPS;
    16761677
    1677 typedef DECLCALLBACKPTR(void, PFNVBOXCAPS_ENTRY_ON_ENABLE)(struct VBOXCAPS *pConsole, struct VBOXCAPS_ENTRY *pCap, BOOL fEnabled);
     1678typedef DECLCALLBACKPTR(void, PFNVBOXCAPS_ENTRY_ON_ENABLE,(struct VBOXCAPS *pConsole, struct VBOXCAPS_ENTRY *pCap, BOOL fEnabled));
    16781679
    16791680typedef struct VBOXCAPS_ENTRY
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.h

    r84720 r85121  
    9898     * @todo r=bird: The pEnv type is WRONG!  Please check all your const pointers.
    9999     */
    100     DECLCALLBACKMEMBER(int,  pfnInit)   (const PVBOXSERVICEENV pEnv, void **ppInstance);
     100    DECLCALLBACKMEMBER(int, pfnInit,(const PVBOXSERVICEENV pEnv, void **ppInstance));
    101101
    102102    /** Called from the worker thread.
     
    108108     *                          before and after blocking.
    109109     */
    110     DECLCALLBACKMEMBER(int,  pfnWorker) (void *pInstance, bool volatile *pfShutdown);
     110    DECLCALLBACKMEMBER(int, pfnWorker,(void *pInstance, bool volatile *pfShutdown));
    111111
    112112    /**
    113113     * Stops a service.
    114114     */
    115     DECLCALLBACKMEMBER(int,  pfnStop)   (void *pInstance);
     115    DECLCALLBACKMEMBER(int, pfnStop,(void *pInstance));
    116116
    117117    /**
     
    120120     * @remarks This may be called even if pfnInit hasn't been called!
    121121     */
    122     DECLCALLBACKMEMBER(void, pfnDestroy)(void *pInstance);
     122    DECLCALLBACKMEMBER(void, pfnDestroy,(void *pInstance));
    123123} VBOXSERVICEDESC, *PVBOXSERVICEDESC;
    124124
  • trunk/src/VBox/Additions/WINNT/tools/VBoxCertUtil.cpp

    r84063 r85121  
    404404 */
    405405static BOOL WINAPI displaySystemStoreCallback(const void *pvSystemStore, DWORD dwFlags, PCERT_SYSTEM_STORE_INFO pStoreInfo,
    406                                               void *pvReserved, void *pvArg)
     406                                              void *pvReserved, void *pvArg) RT_NOTHROW_DEF
    407407{
    408408    RT_NOREF(pvArg);
     
    482482 * Worker for cmdDisplayAll.
    483483 */
    484 static BOOL WINAPI displaySystemStoreLocation(LPCWSTR pwszStoreLocation, DWORD dwFlags, void *pvReserved, void *pvArg)
     484static BOOL WINAPI
     485displaySystemStoreLocation(LPCWSTR pwszStoreLocation, DWORD dwFlags, void *pvReserved, void *pvArg) RT_NOTHROW_DEF
    485486{
    486487    NOREF(pvReserved); NOREF(pvArg);
  • trunk/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp

    r82968 r85121  
    578578            paDeviceModes[i].dmBitsPerPel = BitsPerPixel;
    579579        }
    580         Log(("calling pfnChangeDisplaySettingsEx %p\n", g_pfnChangeDisplaySettingsExA));
     580        Log(("calling pfnChangeDisplaySettingsEx %p\n", RT_CB_LOG_CAST(g_pfnChangeDisplaySettingsExA)));
    581581        g_pfnChangeDisplaySettingsExA((LPSTR)paDisplayDevices[i].DeviceName,
    582582                                      &paDeviceModes[i], NULL, CDS_NORESET | CDS_UPDATEREGISTRY, NULL);
     
    622622
    623623        Log(("VBoxService: g_pfnChangeDisplaySettingsExA=%p g_pfnChangeDisplaySettingsA=%p g_pfnEnumDisplaySettingsA=%p\n",
    624              g_pfnChangeDisplaySettingsExA, g_pfnChangeDisplaySettingsA, g_pfnEnumDisplaySettingsA));
     624             RT_CB_LOG_CAST(g_pfnChangeDisplaySettingsExA), RT_CB_LOG_CAST(g_pfnChangeDisplaySettingsA),
     625             RT_CB_LOG_CAST(g_pfnEnumDisplaySettingsA)));
    625626
    626627        if (   g_pfnChangeDisplaySettingsExA
     
    20232024
    20242025/** command handler type */
    2025 typedef DECLCALLBACK(RTEXITCODE) FNVBOXCTRLCMDHANDLER(int argc, char *argv[]);
     2026typedef DECLCALLBACKTYPE(RTEXITCODE, FNVBOXCTRLCMDHANDLER,(int argc, char *argv[]));
    20262027typedef FNVBOXCTRLCMDHANDLER *PFNVBOXCTRLCMDHANDLER;
    20272028
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp

    r83974 r85121  
    589589 * Callback registered by RegisterServiceCtrlHandler on NT4 and earlier.
    590590 */
    591 static VOID WINAPI vgsvcWinCtrlHandlerNt4(DWORD dwControl)
     591static VOID WINAPI vgsvcWinCtrlHandlerNt4(DWORD dwControl) RT_NOTHROW_DEF
    592592{
    593593    VGSvcVerbose(2, "Control handler (NT4): dwControl=%#x\n", dwControl);
     
    599599 * Callback registered by RegisterServiceCtrlHandler on NT5 and later.
    600600 */
    601 static DWORD WINAPI vgsvcWinCtrlHandlerNt5Plus(DWORD dwControl, DWORD dwEventType, LPVOID lpEventData, LPVOID lpContext)
     601static DWORD WINAPI
     602vgsvcWinCtrlHandlerNt5Plus(DWORD dwControl, DWORD dwEventType, LPVOID lpEventData, LPVOID lpContext) RT_NOTHROW_DEF
    602603{
    603604    VGSvcVerbose(2, "Control handler: dwControl=%#x, dwEventType=%#x\n", dwControl, dwEventType);
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp

    r83974 r85121  
    617617 *          other thread in the process.
    618618 */
    619 static BOOL WINAPI vgsvcWinConsoleControlHandler(DWORD dwCtrlType)
     619static BOOL WINAPI vgsvcWinConsoleControlHandler(DWORD dwCtrlType) RT_NOTHROW_DEF
    620620{
    621621    int rc = VINF_SUCCESS;
     
    12311231# ifndef RT_OS_NT4 /** @todo r=bird: What's RT_OS_NT4??? */
    12321232        /* Install console control handler. */
    1233         if (!SetConsoleCtrlHandler((PHANDLER_ROUTINE)vgsvcWinConsoleControlHandler, TRUE /* Add handler */))
     1233        if (!SetConsoleCtrlHandler(vgsvcWinConsoleControlHandler, TRUE /* Add handler */))
    12341234        {
    12351235            VGSvcError("Unable to add console control handler, error=%ld\n", GetLastError());
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h

    r82968 r85121  
    5454     * @returns VBox status code.
    5555     */
    56     DECLCALLBACKMEMBER(int, pfnPreInit)(void);
     56    DECLCALLBACKMEMBER(int, pfnPreInit,(void));
    5757
    5858    /**
     
    6666     * @param   pi          The argument vector index. Update if any value(s) are eaten.
    6767     */
    68     DECLCALLBACKMEMBER(int, pfnOption)(const char **ppszShort, int argc, char **argv, int *pi);
     68    DECLCALLBACKMEMBER(int, pfnOption,(const char **ppszShort, int argc, char **argv, int *pi));
    6969
    7070    /**
     
    7272     * @returns VBox status code.
    7373     */
    74     DECLCALLBACKMEMBER(int, pfnInit)(void);
     74    DECLCALLBACKMEMBER(int, pfnInit,(void));
    7575
    7676    /** Called from the worker thread.
     
    8181     *                          before and after blocking.
    8282     */
    83     DECLCALLBACKMEMBER(int, pfnWorker)(bool volatile *pfShutdown);
     83    DECLCALLBACKMEMBER(int, pfnWorker,(bool volatile *pfShutdown));
    8484
    8585    /**
    8686     * Stops a service.
    8787     */
    88     DECLCALLBACKMEMBER(void, pfnStop)(void);
     88    DECLCALLBACKMEMBER(void, pfnStop,(void));
    8989
    9090    /**
     
    9393     * @remarks This may be called even if pfnInit hasn't been called!
    9494     */
    95     DECLCALLBACKMEMBER(void, pfnTerm)(void);
     95    DECLCALLBACKMEMBER(void, pfnTerm,(void));
    9696} VBOXSERVICE;
    9797/** Pointer to a VBOXSERVICE. */
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp

    r82968 r85121  
    6868*   Structures and Typedefs                                                                                                      *
    6969*********************************************************************************************************************************/
    70 typedef struct _VBOXSTATSCONTEXT
     70typedef struct VBOXSTATSCONTEXT
    7171{
    7272    RTMSINTERVAL    cMsStatInterval;
     
    7878
    7979#ifdef RT_OS_WINDOWS
    80     NTSTATUS (WINAPI *pfnNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS SystemInformationClass, PVOID SystemInformation,
    81                                                    ULONG SystemInformationLength, PULONG ReturnLength);
    82     void     (WINAPI *pfnGlobalMemoryStatusEx)(LPMEMORYSTATUSEX lpBuffer);
    83     BOOL     (WINAPI *pfnGetPerformanceInfo)(PPERFORMANCE_INFORMATION pPerformanceInformation, DWORD cb);
     80    DECLCALLBACKMEMBER_EX(NTSTATUS, WINAPI, pfnNtQuerySystemInformation,(SYSTEM_INFORMATION_CLASS SystemInformationClass,
     81                                                                         PVOID SystemInformation, ULONG SystemInformationLength,
     82                                                                         PULONG ReturnLength));
     83    DECLCALLBACKMEMBER_EX(void,     WINAPI, pfnGlobalMemoryStatusEx,(LPMEMORYSTATUSEX lpBuffer));
     84    DECLCALLBACKMEMBER_EX(BOOL,     WINAPI, pfnGetPerformanceInfo,(PPERFORMANCE_INFORMATION pPerformanceInformation, DWORD cb));
    8485#endif
    8586} VBOXSTATSCONTEXT;
  • trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientInternal.h

    r82968 r85121  
    3535     * @returns VBox status code.
    3636     */
    37     DECLCALLBACKMEMBER(int, pfnStart)(void);
     37    DECLCALLBACKMEMBER(int, pfnStart,(void));
    3838
    3939    /**
     
    4141     * @returns VBox status code.
    4242     */
    43     DECLCALLBACKMEMBER(int, pfnStop)(void);
     43    DECLCALLBACKMEMBER(int, pfnStop,(void));
    4444
    4545} VBOXCLIENTSERVICE;
  • trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp

    r83135 r85121  
    430430RTVEC_DECL(RectList, RTRECT)
    431431
    432 DECLCALLBACK(int) getRectsCallback(VBoxGuestWinInfo *pInfo,
    433                                    struct RectList *pRects)
     432static DECLCALLBACK(int) getRectsCallback(VBoxGuestWinInfo *pInfo, struct RectList *pRects)
    434433{
    435434    if (pInfo->mhasShape)
     
    485484            return rc;
    486485    }
    487     mGuestWindows.doWithAll((PVBOXGUESTWINCALLBACK)getRectsCallback,
    488                             &rects);
     486    mGuestWindows.doWithAll((PFNVBOXGUESTWINCALLBACK)getRectsCallback, &rects);
    489487    if (mpRects)
    490488        RTMemFree(mpRects);
  • trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h

    r83135 r85121  
    4949/** Structure containing information about a guest window's position and visible area.
    5050    Used inside of VBoxGuestWindowList. */
    51 struct VBoxGuestWinInfo {
     51struct VBoxGuestWinInfo
     52{
    5253public:
    5354    /** Header structure for insertion into an AVL tree */
     
    6667    XRectangle *mpRects;
    6768    /** Constructor. */
    68     VBoxGuestWinInfo(bool hasShape, int x, int y, int w, int h, int cRects,
    69                      XRectangle *pRects)
    70             : mhasShape(hasShape), mX(x), mY(y), mWidth(w), mHeight(h),
    71               mcRects(cRects), mpRects(pRects) {}
     69    VBoxGuestWinInfo(bool hasShape, int x, int y, int w, int h, int cRects, XRectangle *pRects)
     70        : mhasShape(hasShape), mX(x), mY(y), mWidth(w), mHeight(h)
     71        , mcRects(cRects), mpRects(pRects)
     72    {}
    7273
    7374    /** Destructor */
     
    8384private:
    8485    // We don't want a copy constructor or assignment operator
    85     VBoxGuestWinInfo(const VBoxGuestWinInfo&);
    86     VBoxGuestWinInfo& operator=(const VBoxGuestWinInfo&);
     86    VBoxGuestWinInfo(const VBoxGuestWinInfo &);
     87    VBoxGuestWinInfo &operator=(const VBoxGuestWinInfo &);
    8788};
    8889
    8990/** Callback type used for "DoWithAll" calls */
    90 typedef DECLCALLBACK(int) VBOXGUESTWINCALLBACK(VBoxGuestWinInfo *, void *);
     91typedef DECLCALLBACKTYPE(int, FNVBOXGUESTWINCALLBACK,(VBoxGuestWinInfo *, void *));
    9192/** Pointer to VBOXGUESTWINCALLBACK */
    92 typedef VBOXGUESTWINCALLBACK *PVBOXGUESTWINCALLBACK;
    93 
    94 DECLCALLBACK(int) inline VBoxGuestWinCleanup(VBoxGuestWinInfo *pInfo, void *)
     93typedef FNVBOXGUESTWINCALLBACK *PFNVBOXGUESTWINCALLBACK;
     94
     95static inline DECLCALLBACK(int) VBoxGuestWinCleanup(VBoxGuestWinInfo *pInfo, void *)
    9596{
    9697    delete pInfo;
     
    136137    }
    137138
    138     void detachAll(PVBOXGUESTWINCALLBACK pCallback, void *pvParam)
    139     {
    140         RTAvlU32Destroy(&mWindows, (PAVLU32CALLBACK)pCallback, pvParam);
    141     }
    142 
    143     int doWithAll(PVBOXGUESTWINCALLBACK pCallback, void *pvParam)
    144     {
    145         return RTAvlU32DoWithAll(&mWindows, 1, (PAVLU32CALLBACK)pCallback,
    146                                  pvParam);
     139    void detachAll(PFNVBOXGUESTWINCALLBACK pfnCallback, void *pvParam)
     140    {
     141        RTAvlU32Destroy(&mWindows, (PAVLU32CALLBACK)pfnCallback, pvParam);
     142    }
     143
     144    int doWithAll(PFNVBOXGUESTWINCALLBACK pfnCallback, void *pvParam)
     145    {
     146        return RTAvlU32DoWithAll(&mWindows, 1, (PAVLU32CALLBACK)pfnCallback, pvParam);
    147147    }
    148148
     
    152152        LogRelFlowFunc(("hWin=%lu, isMapped=%RTbool, x=%d, y=%d, w=%d, h=%d, cRects=%d\n",
    153153                        (unsigned long) hWin, isMapped, x, y, w, h, cRects));
    154         VBoxGuestWinInfo *pInfo = new VBoxGuestWinInfo(isMapped, x, y, w, h, cRects,
    155                                                        pRects);
     154        VBoxGuestWinInfo *pInfo = new VBoxGuestWinInfo(isMapped, x, y, w, h, cRects, pRects);
    156155        pInfo->Core.Key = hWin;
    157156        LogRelFlowFuncLeave();
  • trunk/src/VBox/Additions/x11/vboxvideo/VBoxVideoIPRT.h

    r82968 r85121  
    110110
    111111#define DECLCALLBACK(type) type
    112 #define DECLCALLBACKMEMBER(type, name) type (* name)
     112#define DECLCALLBACKTYPE(type, name, args) type name args
     113#define DECLCALLBACKMEMB32(type, name, args) type (* name) args
    113114#if __GNUC__ >= 4
    114115# define DECLHIDDEN(type) __attribute__((visibility("hidden"))) type
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette