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
M

MaximE 0

@MaximE 0
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • What the Heck?
    M MaximE 0

    How do you use the VbTopicData?

    C / C++ / MFC c++ question

  • Nanosecond timer resolution for Windows OS
    M MaximE 0

    The best you can get it a 100ns resolution. Search for the "multimedia timer" in MSDN.

    C / C++ / MFC c++ help question

  • Memory leak
    M MaximE 0

    Jesus!!! Does this code work??? (_bstr_t)"DATABASE/TABLE[@Left]" What is this? Never, never do like this. Do: _bstr_t(OLESTR("DATABASE/TABLE[@Left]")) pIXMLDOMNode->Release(); pIXMLDOMNode=NULL; It's not bad, but pIXMLDOMNode = 0 is enough. (LPARAM)(char *)(_bstr_t)Tablename Should be: reinterpret_cast<LPARAM>(static_cast<TCHAR*>(_bstr_t(Tablename))) Such a bad cast should be explicit. pIXMLDOMNode->get_attributes(&pIXMLDOMNamedNodeMap1); You are working with very smart pointer. Instead, do like this: pIXMLDOMNamedNodeMap1 = pIXMLDOMNode->attributes; What is: CHECK_AND_RELEASE(pIXMLDOMDocument2); May be it a: #define CHECK_AND_RELEASE(x) x->AddRef() I don't know. Summary. 1. Never, never use c-casts (like (_bstr_t)x, (LPARAM)y, etc). They are the worst evil, unless you damn sure that you do. It's very hard to find a bug in a such code. 2. Read about _com_ptr_t. Learn how it's intended to use. 3. Avoid macros. 4. Optional, but strongly recommended. Get a Stroustrup.

    C / C++ / MFC database testing beta-testing xml performance
  • Login

  • Don't have an account? Register

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