|
I am trying to use SAX in my Dialog Based Application .
I have a SAXHandler class that derives from the DocumentHandler that SAX provides.
My Dialog Class has a SAXHandler object and a SaxParser Object .
I am having problems when I link the project.
Errors I get are of the type
SAXdev.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall SAXParser::~SAXParser(void)" (__imp_??1SAXParser@@UAE@XZ)
SAXdevDlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall SAXParser::~SAXParser(void)" (__imp_??1SAXParser@@UAE@XZ)
SAXdevDlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall SAXParser::SAXParser(class XMLValidator * const)" (__imp_??0SAXParser@@QAE@QAVXMLValidator@@@Z)
What is the correct method to add the files ?
Please help
|
|
|
|
|
did you implement a constructor and a destructor for your SAXParser object ?
-c
WWJD? JWRTFM. found on /.
|
|
|
|
|
I did not . The SAXParser class is in a .hpp class and is as follows :
class PARSERS_EXPORT SAXParser :
public Parser
, public XMLDocumentHandler
, public XMLErrorReporter
, public XMLEntityHandler
, public DocTypeHandler
{
public :
// -----------------------------------------------------------------------
// Class types
// -----------------------------------------------------------------------
enum ValSchemes
{
Val_Never
, Val_Always
, Val_Auto
};
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
/** @name Constructors and Destructor */
//@{
/** Constructor with an instance of validator class to use for
* validation.
* @param valToAdopt Pointer to the validator instance to use. The
* parser is responsible for freeing the memory.
*/
SAXParser(XMLValidator* const valToAdopt = 0);
/**
* Destructor
*/
~SAXParser();
//@}
It was said that in SAX one needs to only implement the Handler class that derives from Documenthandler
then we need to invoke
parser.SetDocumentHandler(& handlerobject)
parser.Parse();
The sample code I referred from a Text book did not have any initialization for the parser object .
Please help
|
|
|
|
|
you can't declare a constructor (or destructor) and not implement it.
at the very least make them do nothing:
~SAXParser()
{
}
SAXParser::SAXParser(XMLValidator* const valToAdopt = 0)
{
}
WWJD? JWRTFM. found on /.
|
|
|
|
|
I manually put in .bmps in my access database (its a valid thing to do). The images are of type Ole Object. I am trying to retrieve them in the following:
memcpy(pImage, (char *) (_bstr_t) m_pRecordset->Fields->GetItem ("pImage")->Value.bVal,
ImgSize);
where pImage is allocated big enough . So evidently I am not casting the value right. I do need a char* to show in my ImageBoxes(thats what they take), but my code crashes exactly at the line above. I havent figured out how to inspect and see if the image is valid etc, any ideas as to how I could do that?
Thanks for any help you can give me.
ns
|
|
|
|
|
cast pImage to a BITMAPFILEHEADER * and look at the members. they should reflect various aspects of your image.
-c
WWJD? JWRTFM. found on /.
|
|
|
|
|
It may be coiming in as a pointer to bval, i.e.,
m_pRecordset->Fields->GetItem ("pImage")->Value.pbVal
Not sure. But may be
|
|
|
|
|
|
|
Hi,
I have a problem ... i have written a program that communicates with IR - serial communication with my pocket pc and my mobile phone. I used for that a part of the little tty-codesample, which you can find in the help of the Visual C++ tools of Microsoft. I changed there some communication options and it worked. But now i want to use that serial communication with bluetooth. Could that work? And one thing is, that i don't know exactly, how i have to setup the settings for that communication (serial). My current setup is like that:
PortDCB.BaudRate = CBR_9600; PortDCB.fBinary = TRUE;
PortDCB.fParity = TRUE;
PortDCB.fOutxCtsFlow = FALSE; PortDCB.fOutxDsrFlow = FALSE;
PortDCB.fDtrControl = DTR_CONTROL_ENABLE; PortDCB.fDsrSensitivity = FALSE;
PortDCB.fTXContinueOnXoff = TRUE;
PortDCB.fOutX = FALSE;
PortDCB.fInX = FALSE;
PortDCB.fErrorChar = FALSE;
PortDCB.fNull = FALSE;
PortDCB.fRtsControl = RTS_CONTROL_ENABLE;
PortDCB.fAbortOnError = FALSE;
PortDCB.ByteSize = 8;
PortDCB.Parity = NOPARITY;
PortDCB.StopBits = ONESTOPBIT;
and:
CommTimeouts.ReadIntervalTimeout = MAXDWORD;
CommTimeouts.ReadTotalTimeoutMultiplier = 0;
CommTimeouts.ReadTotalTimeoutConstant = 0;
CommTimeouts.WriteTotalTimeoutMultiplier = 10;
CommTimeouts.WriteTotalTimeoutConstant = 1000;
That worked for the IR-communication, but not for bluetooth.
Would be very fine, if someone knows a trick to setup for bluetooth communication !!!
Greetings,
Frank
_____ easySMS for pocket PC _____
www.Siedler-Net.de/WinCE/easySMS/
|
|
|
|
|
|
Hi,
Can anyone point me to some information on how to add and retrieve blob data from an Access database, using Visual C++ 6 (not .Net)
Thanks,
ns
|
|
|
|
|
|
I dont know. All I know is that we want to store pictures in a database ( ACCESS), and then retrieve them and show them. I dont know if we could just input them as char*. The embeded nulls in the binary data might be a problem. I really am very new at this, so any help is greatly appreciated!
Thanks,
ns
|
|
|
|
|
Nishant S wrote:
Does Access have a blob data type? I am not sure. There's something called memo but even that is a limited size field I think
Access has both memos and blobs.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Not sure how to do it using ADO but in principal it should be the same as ODBC.
In ODBC the data will come through as a :
SQL_C_BINARY | SQLCHAR * | unsigned char *
You can load the data into a void pointer and then write it to a file. I did this around 5 years ago. Selected BLOBs of image files from Oracle and wrote it to the drive.
Just cannot recall the exact syntax. But essentially you will get the data in some binary form. Check the ADO documentation. It may come through as a BSTR*.
Hope this helps.
|
|
|
|
|
|
I've been learning C++ 6.0 and have been doing well. I got a copy of C++.net and there are some things that are confusing me.
In 6.0 functions like this are perfectly legal and I have no problems with them:
CLine* CDrawingDoc::AddLine(CPoint ptFrom, CPoint ptTo)
Whenever I try adding any overloaded function to my project in .Net I get an error message that calls it an "Invalid identifier name." Has anyone got any ideas I could use for this? Do I have to add the functions manually?
I really appreciate your time.
Thanks
|
|
|
|
|
|
After using MFC to create an SDI the first thing I do is add a class "CLine" and then 2 member variables m_pfFrom and m_ptTo. I then try adding a function to my class to initialize the from and to points.
Return type blank: and a function name of
CLine(CPoint ptFrom, CPoint ptTo)
I think either I am doing somehting wrong in the wizard or there is a different procedure for this. Like I said, I am quite new to this. In VS6 I have no problems adding functions like this, in .Net I do. I'd really like to start using .Net, so if someone would please advise me on this I would really appreciate it a lot.
Thanks
|
|
|
|
|
After using MFC to create an SDI the first thing I do is add a class "CLine" and then 2 member variables m_pfFrom and m_ptTo. I then try adding a function to my class to initialize the from and to points.
Return type blank: and a function name of
CLine(CPoint ptFrom, CPoint ptTo)
I think either I am doing somehting wrong in the wizard or there is a different procedure for this. Like I said, I am quite new to this. In VS6 I have no problems adding functions like this, in .Net I do. I'd really like to start using .Net, so if someone would please advise me on this I would really appreciate it a lot.
Thanks
|
|
|
|
|
G. White wrote:
CLine(CPoint ptFrom, CPoint ptTo)
I presume you are entering the whole prototype into the edit box. In VS 7 you do it different. Just enter the name of the function into the edit box. You enter the arguments into the list separately.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Thanks a lot! I would never have figured it out!
|
|
|
|
|
Hello White
Could you please change your CP email ID. Seems as if your CP id is an old one you don't use anymore. I just got a bounce of the mail notification. Or could you at least turn off notification as otherwise everyone who replies to you would get bounced notify mails.
----- Original Message -----
From: <zenix1@mailcity.com>
To: "Nishant S" <nish@in.inapp.com>
Sent: Wednesday, August 07, 2002 8:54 PM
Subject: Re: [CodeProject] Re: Help? I'm new.
> I no longer use this email. Get lost!
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
I shut off the auto reply feature, I'm sorry. I was getting a lot of spam and it really irritated me.
Thanks
|
|
|
|