Click here to Skip to main content
16,008,719 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Absolute bloody ADO hell Pin
Michael P Butler17-Sep-01 4:01
Michael P Butler17-Sep-01 4:01 
GeneralRe: Absolute bloody ADO hell Pin
Christian Graus17-Sep-01 4:06
protectorChristian Graus17-Sep-01 4:06 
GeneralRe: Absolute bloody ADO hell Pin
Michael P Butler17-Sep-01 4:27
Michael P Butler17-Sep-01 4:27 
GeneralRe: Absolute bloody ADO hell Pin
Christian Graus17-Sep-01 4:27
protectorChristian Graus17-Sep-01 4:27 
GeneralRe: Absolute bloody ADO hell Pin
Michael P Butler17-Sep-01 4:35
Michael P Butler17-Sep-01 4:35 
GeneralRe: Absolute bloody ADO hell Pin
Jeremy Pullicino17-Sep-01 5:29
Jeremy Pullicino17-Sep-01 5:29 
GeneralRe: Absolute bloody ADO hell Pin
Christian Graus17-Sep-01 13:00
protectorChristian Graus17-Sep-01 13:00 
GeneralAbsolute bloody ATL hell Pin
Christian Graus17-Sep-01 2:12
protectorChristian Graus17-Sep-01 2:12 
I have an IEnumXXX class, and another class which contains my database methods. Tonight I removed some unwanted methods from the database class based on help I got earlier today - no problems.

However, I started work on my MFC client for the database and discovered that now when I get any numeric data from my enumeration, the values are all garbage. Everything comes out with a value of 1. The database is fine, and the program used to return real values. Can anyone suggest what may have gone wrong ? I deleted the methods from the idl, .h and .cpp files, renumbered the methods so they ran from 1 with no gaps and rebuilt all. I had no errors or warnings.

// SAFileEntry.h : Declaration of the CSAFileEntry

#ifndef __SAFILEENTRY_H_
#define __SAFILEENTRY_H_

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CSAFileEntry
class ATL_NO_VTABLE CSAFileEntry : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CSAFileEntry, &CLSID_SAFileEntry>,
	public IDispatchImpl<ISAFileEntry, &IID_ISAFileEntry, &LIBID_SADATABASELib>
{
public:
	CSAFileEntry()
	{
	}

	CComBSTR m_FileName;
	CComBSTR m_FilePath;
	long     m_FileLength;
	long     m_DownloadCount;
	long     m_LastModified;
	long     m_Frames;
	long     m_Seconds;
	long     m_Width;
	long     m_Height;


DECLARE_REGISTRY_RESOURCEID(IDR_SAFILEENTRY)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CSAFileEntry)
	COM_INTERFACE_ENTRY(ISAFileEntry)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// ISAFileEntry
public:
	STDMETHOD(get_Height)(/*[out, retval]*/ long *pVal);
	STDMETHOD(get_Width)(/*[out, retval]*/ long *pVal);
	STDMETHOD(get_Seconds)(/*[out, retval]*/ long *pVal);
	STDMETHOD(get_Frames)(/*[out, retval]*/ long *pVal);
	STDMETHOD(get_Modified)(/*[out, retval]*/ long *pVal);
	STDMETHOD(get_DownloadCount)(/*[out, retval]*/ short *pVal);
	STDMETHOD(get_FileLength)(/*[out, retval]*/ long *pVal);
	STDMETHOD(get_FilePath)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(get_FileName)(/*[out, retval]*/ BSTR *pVal);
};

#endif //__SAFILEENTRY_H_


Only get_FilePath and get_FileName are working, and I've traced in to make sure the values in the class are indeed kaput.



Christian

As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.

Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
GeneralRe: Absolute bloody ATL hell Pin
Michael P Butler17-Sep-01 2:35
Michael P Butler17-Sep-01 2:35 
GeneralRe: Absolute bloody ATL hell Pin
Christian Graus17-Sep-01 2:51
protectorChristian Graus17-Sep-01 2:51 
GeneralRe: Absolute bloody ATL hell Pin
Michael P Butler17-Sep-01 3:02
Michael P Butler17-Sep-01 3:02 
GeneralRe: Absolute bloody ATL hell Pin
Christian Graus17-Sep-01 3:10
protectorChristian Graus17-Sep-01 3:10 
GeneralRe: Absolute bloody ATL hell Pin
Michael P Butler17-Sep-01 3:15
Michael P Butler17-Sep-01 3:15 
GeneralRe: Absolute bloody ATL hell Pin
Christian Graus17-Sep-01 3:30
protectorChristian Graus17-Sep-01 3:30 
GeneralHandling Button's Events Pin
MAAK17-Sep-01 1:26
MAAK17-Sep-01 1:26 
GeneralRe: Handling Button's Events Pin
Michael P Butler17-Sep-01 2:01
Michael P Butler17-Sep-01 2:01 
QuestionHow do I find out what workgroup/domain a host is in? Pin
Paul Vickery17-Sep-01 0:37
professionalPaul Vickery17-Sep-01 0:37 
AnswerRe: How do I find out what workgroup/domain a host is in? Pin
Michael P Butler17-Sep-01 2:07
Michael P Butler17-Sep-01 2:07 
GeneralRe: How do I find out what workgroup/domain a host is in? Pin
Paul Vickery17-Sep-01 3:20
professionalPaul Vickery17-Sep-01 3:20 
GeneralTicks in menus Pin
Nick Armstrong17-Sep-01 0:30
Nick Armstrong17-Sep-01 0:30 
GeneralRe: Ticks in menus Pin
Rashid Thadha17-Sep-01 0:52
Rashid Thadha17-Sep-01 0:52 
GeneralRe: Ticks in menus Pin
Tomasz Sowinski17-Sep-01 0:54
Tomasz Sowinski17-Sep-01 0:54 
GeneralRe: Ticks in menus Pin
Nick Armstrong17-Sep-01 2:03
Nick Armstrong17-Sep-01 2:03 
GeneralRe: Ticks in menus Pin
Tomasz Sowinski17-Sep-01 2:11
Tomasz Sowinski17-Sep-01 2:11 
Generala siple question about initialisation of pointer Pin
Gérald Mercet17-Sep-01 0:15
Gérald Mercet17-Sep-01 0:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.