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. General Programming
  3. C / C++ / MFC
  4. COleVariant's and globally unique ID's

COleVariant's and globally unique ID's

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++databasewpfwcf
1 Posts 1 Posters 0 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.
  • F Offline
    F Offline
    funbag
    wrote on last edited by
    #1

    Background... I'm using the msado15.dll ADO type library for database access. I'm using a class derived from CADORecordBinding to bind to a _RecordsetPtr object, which I'm using to update a list view with. The class is given below. I'm currently reading the MailID field out of the database as an adVariant type, but it's actually an adGUID type. The reason I'm reading as an adVariant, is that I'm not sure how to store an adGUID type as a c/c++ variable. I'm a bit new to all this, so please forgive my greenness! Destroying the CMessageHeadersCache Object... You'll notice that there are COleVariant member variables in the CMessageHeadersCache class. When I call delete on objects this class, the program crashes! When the COleVariant member variables are absent, deallocation goes just fine! I'm sure that there must be some safe/correct/appropriate way of deallocating these objects containing COleVariants, but I'm a bit stuck! Please help! Many thanx, funBag #pragma once #include "icrsint.h" // ============================================================================ // Class CMessageHeadersCache // Purpose ADO Record binding for the Messsage Headers list view object. // History funbag 24th March 2002 Initial Rev. // ============================================================================ class CMessageHeadersCache : public CADORecordBinding { public: CMessageHeadersCache(); ~CMessageHeadersCache(); BEGIN_ADO_BINDING(CMessageHeadersCache) // DateTimeReceived ADO_VARIABLE_LENGTH_ENTRY2(1, adVariant, DateTimeReceived, sizeof(DateTimeReceived), status[0], FALSE) ADO_VARIABLE_LENGTH_ENTRY2(2, adVarChar, SenderMailAddress, sizeof(SenderMailAddress), status[1], FALSE) ADO_VARIABLE_LENGTH_ENTRY2(3, adVarChar, SubjectLine, sizeof(SubjectLine), status[2], FALSE) ADO_VARIABLE_LENGTH_ENTRY2(4, adVarChar, Opened, sizeof(Opened), status[3], FALSE) ADO_VARIABLE_LENGTH_ENTRY2(5, adVariant, MailID, sizeof(MailID), status[4], FALSE) END_ADO_BINDING() public: COleVariant DateTimeReceived; char SenderMailAddress[100]; char SubjectLine[1024]; char Opened[2]; COleVariant MailID; ULONG status[5]; };:(( skydiving....if at fir

    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