Ignore:
Timestamp:
Jul 28, 2001, 8:04:35 PM (24 years ago)
Author:
sandervl
Message:

updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.CPP

    r5895 r6397  
    1 /* $Id: KERNEL32.CPP,v 1.68 2001-06-03 08:49:29 sandervl Exp $ */
     1/* $Id: KERNEL32.CPP,v 1.69 2001-07-28 18:03:36 sandervl Exp $ */
    22
    33/*
     
    129129//******************************************************************************
    130130//******************************************************************************
    131 BOOL WIN32API IsBadCodePtr( FARPROC arg1)
    132 {
    133     dprintf(("KERNEL32:  IsBadCodePtr\n"));
    134     return O32_IsBadCodePtr(arg1);
     131BOOL WIN32API IsBadCodePtr(FARPROC pCode)
     132{
     133    dprintf(("KERNEL32: IsBadCodePtr %x", pCode));
     134    return O32_IsBadCodePtr(pCode);
    135135}
    136136//******************************************************************************
     
    226226    dprintf(("dwAvailVirtual  %X\n", arg1->dwAvailVirtual));
    227227}
     228//******************************************************************************
     229//******************************************************************************
    228230BOOL WIN32API Beep( DWORD arg1, DWORD  arg2)
    229231{
    230     dprintf(("KERNEL32:  OS2Beep\n"));
    231     return O32_Beep(arg1, arg2);
    232 }
    233 //******************************************************************************
    234 //******************************************************************************
    235 VOID WIN32API FatalAppExitA( UINT arg1, LPCSTR  arg2)
    236 {
    237     dprintf(("KERNEL32:  OS2FatalAppExitA\n"));
    238     O32_FatalAppExit(arg1, arg2);
    239 }
    240 //******************************************************************************
    241 //******************************************************************************
    242 VOID WIN32API FatalAppExitW(UINT arg1, LPCWSTR arg2)
    243 {
    244  char *astring;
    245 
    246     dprintf(("KERNEL32: OS2FatalAppExitW %x", arg1));
    247     astring = UnicodeToAsciiString((LPWSTR)arg2);
    248     O32_FatalAppExit(arg1, astring);
    249     //probably won't return, but who cares..
    250     FreeAsciiString(astring);
    251 }
    252 //******************************************************************************
    253 //******************************************************************************
    254 VOID WIN32API FatalExit( UINT arg1)
    255 {
    256     dprintf(("KERNEL32: FatalExit %x", arg1));
    257     O32_FatalExit(arg1);
     232    dprintf(("KERNEL32: Beep %d %d", arg1, arg2));
     233    return OSLibDosBeep(arg1, arg2);
     234}
     235//******************************************************************************
     236//******************************************************************************
     237
     238typedef INT (WINAPI *MessageBoxA_funcptr)(HWND,LPCSTR,LPCSTR,UINT);
     239typedef INT (WINAPI *MessageBoxW_funcptr)(HWND,LPCWSTR,LPCWSTR,UINT);
     240
     241//******************************************************************************
     242//******************************************************************************
     243VOID WIN32API FatalAppExitA( UINT exitCode, LPCSTR  str)
     244{
     245    HMODULE mod = GetModuleHandleA( "user32.dll" );
     246    MessageBoxA_funcptr pMessageBoxA = NULL;
     247
     248    dprintf(("KERNEL32: FatalAppExitA %d %s", exitCode, str));
     249
     250    if (mod) pMessageBoxA = (MessageBoxA_funcptr)GetProcAddress( mod, "MessageBoxA" );
     251    if(pMessageBoxA) pMessageBoxA( 0, str, NULL, MB_SYSTEMMODAL | MB_OK );
     252
     253    ExitProcess(exitCode);
     254}
     255//******************************************************************************
     256//******************************************************************************
     257VOID WIN32API FatalAppExitW(UINT exitCode, LPCWSTR str)
     258{
     259    HMODULE mod = GetModuleHandleA( "user32.dll" );
     260    MessageBoxW_funcptr pMessageBoxW = NULL;
     261
     262    dprintf(("KERNEL32: FatalAppExitW %d %ls", exitCode, str));
     263
     264    if (mod) pMessageBoxW = (MessageBoxW_funcptr)GetProcAddress( mod, "MessageBoxW" );
     265    if(pMessageBoxW) pMessageBoxW( 0, str, NULL, MB_SYSTEMMODAL | MB_OK );
     266
     267    ExitProcess(exitCode);
     268}
     269//******************************************************************************
     270//******************************************************************************
     271VOID WIN32API FatalExit( UINT exitCode)
     272{
     273    dprintf(("KERNEL32: FatalExit %x", exitCode));
     274    ExitProcess(exitCode);
    258275}
    259276//******************************************************************************
     
    261278BOOL WIN32API IsBadHugeReadPtr( const void * arg1, UINT  arg2)
    262279{
    263     dprintf(("KERNEL32:  OS2IsBadHugeReadPtr\n"));
    264     return O32_IsBadHugeReadPtr(arg1, arg2);
     280    return IsBadReadPtr(arg1, arg2);
    265281}
    266282//******************************************************************************
     
    268284BOOL WIN32API IsBadHugeWritePtr( PVOID arg1, UINT  arg2)
    269285{
    270     dprintf(("KERNEL32: IsBadHugeWritePtr\n"));
    271     return O32_IsBadHugeWritePtr(arg1, arg2);
     286    return IsBadWritePtr(arg1, arg2);
    272287}
    273288//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.