|
Actually what I want to do is, write a BYTE* buffer in varbinary(MAX) type in a database. Do you know how to do it.
Since the image type use separate data page internally I cannot use it for my application.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
In my understanding BLOB can be saved as varbinary
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Is that VARIANT data type is same as binary or BLOB? I'm not clear that.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi All,
I ported an application from VC++ 6.0 to VC++ 9.0.
When i move the exe and run on a different machine it says
"The application failed to start because the applcation config is incorrect. Reinstalling the application might fix the problem."
The configuration settings are
1. No Clr.
When i tried to change the CodeGeneration ->Runtime Libs to Multi threaded/MT It failed and prompted to keep it to MD
Any suggestions guys?
Thanks.
modified on Wednesday, January 21, 2009 7:35 PM
|
|
|
|
|
|
Hi,
Thanks for your information.
Installing .Net framework 3.5 should work usually.
If i am distributing my application for N systems, is it that i need to distribute vc++ 2008 redistributable insted of distributing only the .Net 3.5 framework.
Thanks.
|
|
|
|
|
Does anyone out there have any pointers or clues to help someone determine why the EXE can get oversized?
Does the MAP have enough information to do this?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
I think there are 3 ways in which size of exe can be large.
1. Linking to static libraries.
2. Embedded resources.
3. Having large constant arrays/string in the code.
Of course size of exe is also determined by number of function and classes in code. I don't think there is an automated way to determine the cause of large exe size.
-Saurabh
|
|
|
|
|
Thanks for the list, I am pretty aware of all that.
It would be super handy if the debugger could tell you all that!
I wonder if the size of the OBJ's might render a clue?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
Does dumpbin helps? I just tried it and it does show the content of each section in an EXE or OBJ file. It also show the summary of different sections. I am not sure if it is easy to find the source of data in each section.
-Saurabh
|
|
|
|
|
In addition to above, confirm you have not selected the "Link incrementally" option.
|
|
|
|
|
On a sidenote, the debug EXE -since it is stuffed with debug information and other "surprises"- will be much bigger than the release one. Can it be that you simply forgot to switch your configuration from DEBUG to RELEASE?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
if it only were that simple...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
I created a binary predicate
// binary predicate for searching by exp date
bool exp_LT(curvePoint<double> lhs, curvePoint<double> rhs) { return (lhs.getExp() < rhs.getExp()); }
so I could search a vector by _expDate rather than _mDate on the curvePoint class:
template<class _Ty> class curvePoint : public subscriber
{
friend fwdCurve;
friend bktCurve;
public:
void setValue(_Ty p) { _mValue = p; }
_Ty getValue() { return _mValue; }
void setDate(Date d) { _mDate = d; }
inline void setDate(long d) { _mDate = d; }
Date getDate() { return _mDate; }
void setExp(Date d) { _expDate = d; }
void setExp(long d) { _expDate = d; }
Date getExp() { return _expDate; }
void update() {}
// allow self comparison
bool operator<(const curvePoint<_Ty>& rhs) const { return _mDate < rhs._mDate; }
bool operator>(const curvePoint<_Ty>& rhs) const { return _mDate > rhs._mDate; }
bool operator==(const curvePoint<_Ty>& rhs) const { return _mDate == rhs._mDate; }
bool operator!=(const curvePoint<_Ty>& rhs) const { return _mDate != rhs._mDate; }
protected:
_Ty _mValue;
Date _mDate;
Date _expDate;
};
When I call
curvePoint<double> c;
c.setExp(myDate("01/01/2009"));
i = lower_bound(vector.begin(), vector.end(), &c, exp_LT); <---- Crashes here
The compiler throws an error (C2664). The message is
1>c:\program files\microsoft visual studio 8\vc\include\xutility(312) : error C2664: 'bool (RAIV::curvePoint<_Ty>,RAIV::curvePoint<_Ty>)' : cannot convert parameter 2 from 'RAIV::curvePoint<_Ty> ' to 'RAIV::curvePoint<_Ty>'
1> with
1> [
1> _Ty=double
1> ]
1> No constructor could take the source type, or constructor overload resolution was ambiguous
I'm guessing the compiler cannot resolve something about the templated curvePoint<double> parameter but am at a loss as to how to proceed.
|
|
|
|
|
mjackson11 wrote: bool exp_LT(curvePoint<double> lhs, curvePoint<double> rhs) { return (lhs.getExp() < rhs.getExp()); }
Don't you want those to be references?
led mike
|
|
|
|
|
You can try
template< typename T >
struct curve_lt : public binary_function <T, T, bool>
{
bool operator()( const T &rhs, const T &lhs )
{
return rhs.getDate() < lhs.getData();
}
};
......
i = lower_bound(vector.begin(), vector.end(), &c, curve_lt());
|
|
|
|
|
It turned out that I called the routine correctly 5 times, on the sixth call, I had the wrong kind of parameter there, (an iterator as opposed to the actual class). Somehow that caused an error in all six places the function was called.
|
|
|
|
|
On a side note, a few changes will makes things better. First change this function by adding the underlined bits:
bool exp_LT(const curvePoint<double> &lhs, const curvePoint<double> &rhs) { return (lhs.getExp() < rhs.getExp()); }
Now change the class as follows (again, by adding the underlined bits):
public:
void setValue(_Ty p) { _mValue = p; }
_Ty getValue() const { return _mValue; }
void setDate(Date d) { _mDate = d; }
inline void setDate(long d) { _mDate = d; }
Date getDate() const { return _mDate; }
void setExp(Date d) { _expDate = d; }
void setExp(long d) { _expDate = d; }
Date getExp() const { return _expDate; }
Steve
|
|
|
|
|
Hi All,
I am working on a project which has 2 seperate processes.
1. MFC Dialog application
2. Windows Service written in C#
I want to send a user defined message from MDF Dialog application to the Windows service written in C#
Send message/post message dosent work as it need a handle to the window of the receiver, which we will not have in case of a service.
How can i accomplish this.
Thanks everyone.
|
|
|
|
|
There are many other IPC methods - named pipes, shared memory, mailslots, etc. I've unsed name pipes in the past, but I can;t say they're the best.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Dear sir,
I am using the "MimeSniffer.dll" for opening the eml files.
The eml files without the attachment is opened perfectly without any problems.
But when i tried to open the eml file having attachments, i was not able to get the body text of that eml file.
Sir, i have pasted the content of eml file, that i tried to open, below:
Please suggest me some solution for this.
Thanks & Regards
Sandeep
/****************************************************************************/
From: <xyz@xyz.com>
To: <abc@abc.com>
Subject: test mail
Date: Mon, 19 Jan 2009 16:42:46 +0530
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0019_01C97A54.F7104550"
X-Priority: 3
X-MSMail-Priority: Normal
X-Unsent: 1
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
This is a multi-part message in MIME format.
------=_NextPart_000_0019_01C97A54.F7104550
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_001A_01C97A54.F7104550"
------=_NextPart_001_001A_01C97A54.F7104550
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
hi=20
this is test mail.
hi=20
this is test mail.
hi=20
this is test mail.
hi=20
this is test mail.
hi=20
this is test mail.
------=_NextPart_001_001A_01C97A54.F7104550
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
charset=3Diso-8859-1">
|
|
|
|
|
I have some richedit controls in form view.
When doing mouse wheel scroll, I am getting notification message to OnNotify() function by setting ENM_SCROLLEVENTS mask to the richedit control.
But I want the OnMouseWheel() function to be called as I want to do scrolling of Form view like this inside "OnMouseWheel()":
<br />
OnMouseWheel(UINT fFlags, short zDelta, CPoint point)<br />
{<br />
if (fFlags & (MK_SHIFT | MK_CONTROL))<br />
return FALSE;<br />
<br />
return DoMouseWheel(fFlags, zDelta, point);<br />
}<br />
How to do this.
Or can I do scrolling by using OnNotify() itself?
Thanks & Regards,
Sabapathy
|
|
|
|
|
Looking at the docs[^], you'll get sent an EN_MSGFILTER[^] notification, which includes a pointer to a MSGFILTER[^] structure. This structure includes the original mouse wheel message, which you could send to the form? So, if I understand your question correctly, you could do the scrolling by forwarding the mouse wheel message to the form.
|
|
|
|
|
Hello All,
I am doing SDI application in MFC (VC++) . In that parent, window is having a Menu Bar. When I select one of the Menu option from parent window, another child window will be created. This child window is having its own Menu Bar.
Problem is that this Menu Bar’s submenu is disabled at starting. But when I click on child window’s view, this child window’s submenu item is enabled. How can I enable child window’s submenu item without clicking on child window’s view.
I written the follwing code in the Parent window's MenuBar. When i click on this Parent window sub menu item, child window is created of the name "Bed1" and attach the MenuBar IDR_MENU1 to this chile window
//////
CFrameWnd* pFrame ;
pFrame = new CFrameWnd;
if(!pFrame->Create(NULL,_T("Bed1"),WS_OVERLAPPEDWINDOW ,CRect(0,0,200,200),this,MAKEINTRESOURCE(IDR_MENU1),NULL,&newContext))
{
TRACE0("Failed to create MenuBar");
}
pFrame->SetWindowPos(NULL,rect.left,rect.top,rect.Width()/2,rect.Height()/2,SWP_SHOWWINDOW);
//////
If anybody know the solution, please help.
|
|
|
|
|
I want to show hotkey for menu items like "Ctrl + L" etc.
I have given it with "\t" like "E-mail\tCtrl + E" to align it in right side.
But when running application, the hotkey text is not visible.
Instead of tab, if I give spaces, it is showing, but alignment is varying between systems.
How to solve this, is there any other way to do this?
|
|
|
|