Hello everybody,
I am using eVC to develop an application for PocketPC.I am using SQLServer
CE as my device database.I am loading a bitmap onto my device.I want to save
the same to the database with 'image' datatype.
These are the declarations i am giving in the header file.
ULONG m_cRef;
void* m_pBuffer;
ULONG m_cBufSize;
ULONG m_iPos;
#define SAFE_RELEASE(pIUnknown) if(pIUnknown) (pIUnknown)->Release();
void operator void* const() { return m_pBuffer; };
STDMETHODIMP_(ULONG) AddRef(void);
STDMETHODIMP_(ULONG) Release(void);
STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
STDMETHODIMP Read(void __RPC_FAR *pv, ULONG cb, ULONG __RPC_FAR *pcbRead);
STDMETHODIMP Write(const void __RPC_FAR *pv,ULONG cb,ULONG __RPC_FAR
*pcbWritten);
typedef struct tagDBOBJECT { DWORD dwFlags;
IID iid;
} DBOBJECT;
when i compiled i am getting the following error.
error C2549: user-defined conversion cannot specify a return type
error C2801: 'operator user-defined conversion' must be a <Unknown> member
error C2549: user-defined conversion cannot specify a return type
error C2801: 'operator user-defined conversion' must be a <Unknown> member
Do i need to include any more header files to do this?
These are the header files i am including in my cpp file.
#define UNICODE
#define DBINITCONSTANTS
#define INITGID
#include <windows.h>
#include <stdio.h>
#include <stddef.h>
#include <iostream.h>
#include <oledberr.h>
#include <oledb.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
This is the code in the saveBmp() function for saving the bitmap
IAccessor* pIAccessor = NULL;
ICommandText* pICommandText = NULL;
ICommandProperties* pICommandProperties = NULL;
IRowsetChange* pIRowsetChange = NULL;
IRowset* pIRowset = NULL;
DBBINDING rgBindings[cBindings];
struct BLOBDATA
{
DBSTATUS dwStatus;
DWORD dwLength;
ISequentialStream* pISeqStream;
These are the errorsQuote:};
error C2065: 'DBBINDING' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'rgBindings'
error C2065: 'rgBindings' : undeclared identifier
error C2109: subscript requires array or pointer type
error C2501: 'DBSTATUS' : missing storage-class or type specifiers
error C2501: 'dwStatus' : missing storage-class or type specifiers
error C2065: 'IAccessor' : undeclared identifier
error C2106: '=' : left operand must be l-value
error C2065: 'ICommandText' : undeclared identifier
error C2065: 'pICommandText' : undeclared identifier
error C2106: '=' : left operand must be l-value
error C2065: 'ICommandProperties' : undeclared identifier
error C2065: 'pICommandProperties' : undeclared identifier
error C2106: '=' : left operand must be l-value
error C2065: 'IRowsetChange' : undeclared identifier
error C2065: 'pIRowsetChange' : undeclared identifier
error C2065: 'IRowset' : undeclared identifier
error C2106: '=' : left operand must be l-value
What might be the problem?Can anybody help me in this reagrd.
Thanking you,
RajaSekhar