home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / numega / sc501.exe / data1.cab / Examples / DLPHIERR.RC2 < prev    next >
Encoding:
Text File  |  1997-11-25  |  9.5 KB  |  214 lines

  1. //
  2. // BUGBENCH.RC2 - resources Microsoft Visual C++ does not edit directly
  3. //
  4.  
  5. #ifdef APSTUDIO_INVOKED
  6.    #error this file is not editable by Microsoft Visual C++
  7. #endif //APSTUDIO_INVOKED
  8.  
  9. // This file gives us the _MFC_VER define.  We have to do these goofy
  10. //  defines just to get this file included in a resource.  Microsoft
  11. //  should have put _MFC_VER in it's own include file.
  12. #define _MT
  13. #define _X86_
  14. #define _DLL
  15. //#include <AFXVER_.h>
  16. #include "dlphires.H"
  17.  
  18. ////////////////////////////////////////////////////////////////////////
  19. // Add manually edited resources here...
  20.  
  21. // All of these string tables are here because they are far easier
  22. //  to edit by hand than use the App Studio.
  23.  
  24. // The main root objects, all the "checks".
  25. STRINGTABLE DISCARDABLE
  26. BEGIN
  27.     IDS_APIANDOLECHECK      "API and OLE error checking"
  28.     IDS_MEMORYCHECK         "Memory error checking"
  29.     IDS_POINTERANDLEAKCHECK "Pointer and leak error checking"
  30. END
  31.  
  32. // The descriptions of the root objects.
  33. STRINGTABLE DISCARDABLE
  34. BEGIN
  35.     IDS_APIANDOLECHECKDESC      "API and OLE error checking detects invalid, Windows API and OLE Interface, arguments and return codes"
  36.     IDS_MEMORYCHECKDESC         "Memory error checking detects invalid reads and writes to and from memory"
  37.     IDS_POINTERANDLEAKCHECKDESC "Pointer and leak error checking detects invalid pointer manipulations and resource leakage"
  38. END
  39.  
  40.  
  41.  
  42. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  43. // API and OLE check - Error Types.
  44. STRINGTABLE DISCARDABLE
  45. BEGIN
  46.    IDS_APIFAILWINFUNCFAIL         "API failure: Windows function failed"
  47.    IDS_INVALIDARGGENERAL          "Invalid argument"
  48.    IDS_INVALIDARGBADDESTPTR       "Invalid argument: Bad destination pointer"
  49.    IDS_INVALIDARGBADHANDLE        "Invalid argument: Bad handle"
  50.    IDS_INVALIDARGBADSRCPTR        "Invalid argument: Bad source pointer"
  51.    IDS_INVALIDARGSTRUCTURE        "Invalid argument: Structure size field is not initialized"
  52.    IDS_INVALIDARGOUTORANGE        "Invalid argument: Out of range"
  53.    IDS_INVALIDARGCONFLICT         "Invalid argument: Conflicting combination of flags"
  54.    IDS_INVALIDARGUNDEFINED        "Invalid argument: Undefined or illegal flags"
  55. END
  56.  
  57.  
  58. // Memory Check - Error Types.
  59. STRINGTABLE DISCARDABLE
  60. BEGIN
  61.    IDS_DYNMEMOVERRUN             "Dynamic memory overrun"
  62.    IDS_INVALIDARGFREEDHANDLELOCK  "Freed handle is still locked"
  63.    IDS_INVALIDARGHANDLEUNLOCKED   "Handle is already unlocked"
  64.    IDS_STACKMEMOVERRUN           "Stack memory overrun"
  65.    // IDS_OVERWRITERECMEM           "Static memory overrun"
  66.    IDS_PTRREFSUNLOCKEDBLOCK      "Pointer references unlocked memory block"
  67. END
  68.  
  69. // Pointer and Leak Check - Error Types.
  70. STRINGTABLE DISCARDABLE
  71. BEGIN
  72.    IDS_MEMLEAK                   "Memory leak"
  73.    IDS_RESOURCELEAK              "Resource leak"
  74. END
  75.  
  76.  
  77. // 1 1 ; API and OLE check - API failure: Windows function failed
  78. STRINGTABLE DISCARDABLE
  79. BEGIN
  80.    IDS_APIFAILLOADBITMAPINST  "LoadBitmap (Delphi)"
  81.    IDS_APIFAILLOADBITMAPDESC  "LoadBitmap is passed an invalid bitmap. LoadBitmap will fail if the bitmap does not exist.\nAll Windows APIs that fail will be reported via this error."
  82.    IDS_APIFAILLOADMENUINST   "LoadMenu (Delphi)"
  83.    IDS_APIFAILLOADMENUDESC   "LoadMenu is passed an invalid resource name.  LoadMenu will fail if the resource does not exist.\nAll Windows APIs that fail will be reported via this error."
  84. END
  85.  
  86. // 1 2 ; API and OLE check - Invalid argument: General
  87. STRINGTABLE DISCARDABLE
  88. BEGIN
  89.     IDS_APIINVALIDARGDELETEMENUINST "DeleteMenu (Delphi)"
  90.     IDS_APIINVALIDARGDELETEMENUDESC "DeleteMenu is called with an invalid handle to a menu. \nThis is a standard Win32 API call."
  91.     IDS_APIINVALIDARGGETTEXTCOLORINST "GetTextColor (Delphi)"
  92.     IDS_APIINVALIDARGGETTEXTCOLORDESC "A call to GetTextColor with an invalid handle to a device context. \nThis is a standard Win32 API call."
  93. END
  94.  
  95. // 1 3 ; API and OLE check - Invalid argument: Bad destination pointer
  96. STRINGTABLE DISCARDABLE
  97. BEGIN
  98.    IDS_APISTRCOPYBADDESTPTRINST   "StrCopy (Delphi)"
  99.    IDS_APISTRCOPYBADDESTPTRDESC   "An invalid pointer is used for the StrCopy destination.  The destination pointer to string functions must be valid."
  100. END
  101.  
  102. // 1 4 ; API and OLE check - Invalid argument: Bad handle
  103. STRINGTABLE DISCARDABLE
  104. BEGIN
  105.    IDS_APIFREEMEMBADHANDLEINST "FreeMem (Delphi)"
  106.    IDS_APIFREEMEMBADHANDLEDESC "A bad handle is passed to FreeMem. Handles passed to functions must be valid."
  107. END
  108.  
  109. // 1 5 ; API and OLE check - Invalid argument: Bad source pointer
  110. STRINGTABLE DISCARDABLE
  111. BEGIN
  112.    IDS_APISTRCOPYBADSRCPTRINST "StrCopy (Delphi)"
  113.    IDS_APISTRCOPYBADSRCPTRDESC "StrCopy source pointer is NIL. The source pointer to string functions must be valid."
  114. END
  115.  
  116. // 1 6 ; API and OLE check - Invalid argument: Structure size field is not initialized
  117. STRINGTABLE DISCARDABLE
  118. BEGIN
  119.    IDS_APIGETVERSIONSTRUCTSIZEINST  "GetVersionEx (Delphi)"
  120.    IDS_APIGETVERSIONSTRUCTSIZEDESC  "GetVersionEx is called with an OSVERSIONINFO structure memset to null. The size field of structures must always be filled in."
  121. END
  122.  
  123. // 1 7 ; API and OLE check - Invalid argument: Out of range
  124. STRINGTABLE DISCARDABLE
  125. BEGIN
  126.    IDS_APIOUTOFRANGEINST     "GetKeyState (Delphi)"
  127.    IDS_APIOUTOFRANGEDESC     "GetKeyState is called with an invalid virtual key code argument of 0xFFFF."
  128. END
  129.  
  130. // 1 8 ; API and OLE check - Invalid argument: Conflicting combination of flags
  131. STRINGTABLE DISCARDABLE
  132. BEGIN
  133.    IDS_APICONFLICTFLAGSGETSTRINGTYPEINST "GetStringType"
  134.    IDS_APICONFLICTFLAGSGETSTRINGTYPEDESC "Conflicting flags in the dwInfoType argument to GetStringType. The dwInfoType argument can be either CT_TYPE1, CT_TYPE2, or CT_TYPE3."
  135. END
  136.  
  137. // 1 9 ; API and OLE check - Invalid argument: Undefined or illegal flags
  138. STRINGTABLE DISCARDABLE
  139. BEGIN
  140.    IDS_APIILLEGALFLAGSAPPENDMENUINST "AppendMenu (Delphi)"
  141.    IDS_APIILLEGALFLAGSAPPENDMENUDESC "AppendMenu is called with an invalid fuFlags argument. The fuFlags argument to AppendMenu must be one of MF_SEPARATOR, MF_GRAYED, MF_DISABLED, MF_CHECKED, MF_BITMAP, MF_OWNERDRAW, MF_POPUP, MF_MENUBARBREAK or MF_MENUBREAK."
  142. END
  143.  
  144.  
  145. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  146. // Memory Check - Error types
  147. // 2 1 ; Memory Check - Dynamic memory overrun
  148. STRINGTABLE DISCARDABLE
  149. BEGIN
  150.    IDS_WRITEDYNOVERRUNINST   "Overrun an allocated block (Delphi)"
  151.    IDS_WRITEDYNOVERRUNDESC   "Write past the end of an allocated block of memory."
  152. END
  153.  
  154. // 2 2 ; Memory Check - Freed handle is still locked
  155. STRINGTABLE DISCARDABLE
  156. BEGIN
  157.    IDS_APIGLOBALFREELOCKINST  "GlobalFree (Delphi)"
  158.    IDS_APIGLOBALFREELOCKDESC  "A locked handle is passed to GlobalFree. Handles must be unlocked in order to be successfully freed using GlobalFree."
  159. END
  160.  
  161. // 2 3 ; Memory Check - Handle is already unlocked
  162. STRINGTABLE DISCARDABLE
  163. BEGIN
  164.    IDS_APIGLOBALFREEUNLOCKINST  "GlobalFree (Delphi)"
  165.    IDS_APIGLOBALFREEUNLOCKDESC  "An unlocked handle is passed to GlobalFree. Handles must not have a lock count of zero when passed to GlobalFree."
  166. END
  167.  
  168. // 2 4 ; Memory Check - Stack memory overrun
  169. STRINGTABLE DISCARDABLE
  170. BEGIN
  171.    IDS_WRITESTACKOVERRUNSTRCOPYINST "Overrun a stack variable: StrCopy (Delphi)"
  172.    IDS_WRITESTACKOVERRUNSTRCOPYDESC "Write past the end of a stack variable.\nWARNING: This bug may cause BugBench to crash."
  173.    IDS_WRITESTACKOVERRUNFILLCHARINST "Overrun a stack variable: FillChar (Delphi)"
  174.    IDS_WRITESTACKOVERRUNFILLCHARDESC "Write past the end of a stack variable.\nWARNING: This bug may cause BugBench to crash."
  175. END
  176.  
  177. // 2 5 ; Memory Check - Static memory overrun
  178. STRINGTABLE DISCARDABLE
  179. BEGIN
  180.    IDS_WRITEOVERWRITERECORDINST   "Overrun an element inside a record. (Delphi)"
  181.    IDS_WRITEOVERWRITERECORDDESC   "Overrun the second element in a record."
  182. END
  183.  
  184. // 2 6 ; Memory Check - Pointer references unlocked memory block
  185. STRINGTABLE DISCARDABLE
  186. BEGIN
  187.    IDS_PTRREFUNLOCKINST  "Use a pointer that is fully unlocked. (Delphi)"
  188.    IDS_PTRREFUNLOCKDESC  "In Windows you can allocate memory as moveable. When you do this, you must lock the memory before you can use it. If the code has been instrumented, those errors take precedence so this is reported as a writing dangling pointer error."
  189. END
  190.  
  191. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  192. // Leak and Pointer Check - Error types
  193. // 3 1 ; Leak and Pointer Check - Dynamic memory overrun
  194. STRINGTABLE DISCARDABLE
  195. BEGIN
  196.    IDS_MEMALLOCMEMINST   "AllocMem (Delphi)"
  197.    IDS_MEMALLOCMEMDESC   "A block of memory is allocated and never freed. \n(This error is not reported until the program is terminated.)"
  198.    IDS_MEMSTRALLOCINST   "StrAlloc (Delphi)"
  199.    IDS_MEMSTRALLOCDESC   "A string is allocated and never freed. \n(This error is not reported until the program is terminated.)"
  200.    IDS_MEMSTRNEWINST   "StrNew (Delphi)"
  201.    IDS_MEMSTRNEWDESC   "A string is allocated through StrNew and never freed. \n(This error is not reported until the program is terminated.)"
  202. END
  203.  
  204. // 3 2 ; Leak and Pointer Check - Resource leak.
  205. STRINGTABLE DISCARDABLE
  206. BEGIN
  207.    IDS_RESBITMAPINST   "Create a bitmap that is not destroyed (Delphi)"
  208.    IDS_RESBITMAPDESC   "All resources should be deleted when the program ends. \n(This error is not reported until the program is terminated.)"
  209.    IDS_RESMENUINST  "Create a menu that is not destroyed (Delphi)"
  210.    IDS_RESMENUDESC  "All resources should be deleted when the program ends. \n(This error is not reported until the program is terminated.)"
  211. END
  212.  
  213. ////////////////////////////////////////////////////////////////////////
  214.