Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. ADO bug in VC++ 6 SP5 + Processor Pack

ADO bug in VC++ 6 SP5 + Processor Pack

Scheduled Pinned Locked Moved Database
c++helpquestionsharepointdebugging
2 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John M Drescher
    wrote on last edited by
    #1

    I have recently installed both SP5 and the Processor Pack to visual C++ 6 and I am having the following problem. When an exception occurs inside a try catch block inside a function that calls ado methods the function crashes (in the debug build) on return. The following code runs fine when compiled with an earlier service pack and no processor pack, but with SP5 + Processor Pack it crashes during the return from the test function. Also if I compile it on a pc with an eariler sp, it will debug and run fine on a machine with the latest sp (as long as you don't try to compile!). The following code has been reduced to the smallest part that I could get it to crash. I compiled it as a Win32 console application and did not change any of the default values. In SP5 + processor pack an access violation occurs when test() returns. This was tested on win2k. I compiled and tested it in debug build only. #include "stdafx.h" // You must change this to match your path #import "D:\program files\common files\system\ado\msado15.dll" \ no_namespace \ rename( "EOF", "adoEOF" ) void test() { _RecordsetPtr pRst = NULL; try { throw "a"; pRst->Open(_variant_t(), _variant_t(),adOpenStatic , adLockReadOnly, adCmdText); } catch (...) { } } int main(int argc, char* argv[]) { test(); return 0; } My question is 1) Has anyone seen this problem? 2) am I doing something wrong?

    R 1 Reply Last reply
    0
    • J John M Drescher

      I have recently installed both SP5 and the Processor Pack to visual C++ 6 and I am having the following problem. When an exception occurs inside a try catch block inside a function that calls ado methods the function crashes (in the debug build) on return. The following code runs fine when compiled with an earlier service pack and no processor pack, but with SP5 + Processor Pack it crashes during the return from the test function. Also if I compile it on a pc with an eariler sp, it will debug and run fine on a machine with the latest sp (as long as you don't try to compile!). The following code has been reduced to the smallest part that I could get it to crash. I compiled it as a Win32 console application and did not change any of the default values. In SP5 + processor pack an access violation occurs when test() returns. This was tested on win2k. I compiled and tested it in debug build only. #include "stdafx.h" // You must change this to match your path #import "D:\program files\common files\system\ado\msado15.dll" \ no_namespace \ rename( "EOF", "adoEOF" ) void test() { _RecordsetPtr pRst = NULL; try { throw "a"; pRst->Open(_variant_t(), _variant_t(),adOpenStatic , adLockReadOnly, adCmdText); } catch (...) { } } int main(int argc, char* argv[]) { test(); return 0; } My question is 1) Has anyone seen this problem? 2) am I doing something wrong?

      R Offline
      R Offline
      Rashid Thadha
      wrote on last edited by
      #2

      your code where you have

      throw "a";

      looks well dodgy !!!! maybe you should remove that :cool:

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups