|
I have a C++ app that makes various API calls to a custom API, but I dont have the sources for either the app or the API.
Is there a way I can trace the calls that are made from the app to the api? And what parameters are sent?
Apologies if this is a bit vague, but I am no C++ expert
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
I have a CPropertySheet derived class that's a child of a CDialog derived class (main app window.) When a control on the property sheet has focus and I take an action that changes the active window, things get very strange. It looks like an endless loop of WM_GETDLGCODE messages are being generated and processed, so everything locks up. Anybody have any ideas what causes this or how to fix it?
Thanks.
|
|
|
|
|
Check it using a debugger!
Don't try it, just do it!
|
|
|
|
|
Assuming the question was, what does MAKEINTRESOURCE do?
It casts the integer value supplied - which must be below 65536, i.e. fit in a 16-bit quantity - to an LPTSTR , reinterpreting the bit pattern. APIs which expect a resource identifier can take either an integer or a pointer to a string. If the value of the pointer is under 65536, they interpret the value as an integer identifier; otherwise, it is interpreted as a string identifier. You can use the IS_INTRESOURCE macro to check if a resource identifier is a string or an integer.
Windows deliberately reserves the address space between 0 and 0x00010000 for this reason, and to ensure that programs get an access violation if they try to read or write through a NULL pointer (which on Windows is simply a pointer with the value 0).
MAKEINTRESOURCE is implemented in winuser.h . Reading the headers can lead to greater understanding.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
What data type support the operator << of CArchive??.
Thank you.
|
|
|
|
|
|
primitive data types or serializable objects (that derives, either directly or indirectly, from CObject).
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
i used a CAsyncsocket class in my service prog,and create socket succeed.when socket was connected ,the connect()function return zero. getlasterror() show the error is 997:(Overlapped I/O operation is in progress).but it is strange that:at first, my prog was fault,the socket can also receive and send data in the state of error(connect() return zero).why?
class CMysocket : public CAsyncSocket
{ .........}
class CServiceWnd : public CWinThread
{
CMysocket * m_pSocket;
..........
}
BOOL CServiceWnd::Createsocket()
{
if (m_pSocket != NULL)
{
delete m_pSocket;
m_pSocket = NULL;
}
m_pSocket = new CMysocket();
if (!m_pSocket->Create())
{
LogEvent("Socket failure", 0, FALSE);
return FALSE;
}
int s;
s=m_pSocket->Connect(IP_Address,IP_Port);
CString ss;
ss.Format("Connect(IP_Address, IP_Port) return :%d",s);
LogEvent(ss,0, FALSE);
if(Is)
//at first,i set "ifisj"Cbut can also send/receiveIIH
{
if (m_pSocket->GetLastError() != WSAEWOULDBLOCK)
{
CString strError;
strError.Format("can't connect,last error is %d",m_pSocket->GetLastError());
LogEvent (strError, 0, FALSE);
m_fConnected = FALSE;
delete m_pSocket;
m_pSocket = NULL;
return FALSE;
}
}
m_fConnected = TRUE;
LogEvent (_T("connected"), 0, FALSE);
return TRUE;
}
|
|
|
|
|
Hi all,
I'm using MFC (VC6) and have a list control in a dialog that I would like to catch double-clicks.
I've searched through the class wizard messages available to the list control but do not find any that can be used...
What am I missing here?
Any help welcome.
|
|
|
|
|
Try NM_DBLCLK. It is a Common Controls notification in common with others, rather than a List Control
specifically.
Unless you mean a ListBox, in which case you want LBN_DBLCLK.
Iain.
|
|
|
|
|
Thanks, that worked...
Now, can anyone explain to me why the description for the control's message that the class wizard shows on the bottom of its window is cut on the right?
If I could see the whole explanation I would not need to ask this here...
All I could see was
Indicates that the user has double-clicked the left mouse button in the
The what?
Nice one, Microsoft
Anyway, thanks for the help
|
|
|
|
|
Forget class wizard. With VC++ you would have got the MSDN cds.
Run that, and search for NM_DBLCK, etc, and get the full info there.
Or on the wab: NM_DBLCLK[^].
Iain.
|
|
|
|
|
plz help me i have just 3 days left to make a programme in borland c++ dos mode for grphics
programe should take input from user any alphabet that alphabet should rotate about its axis and can be zoomed
plz any genius person can 2 that in 2 days if any one can do that iwill be ver very very very thank full to him
thnx
umair majeed
|
|
|
|
|
can you use directx? if so, use the D3DXDrawText() function
If it's broken, I probably did it
bdiamond
|
|
|
|
|
I'm programming an activeX control and my 'OnDraw' function uses both gdiplus and standard gdi calls.
When I insert my control into a dialog ressource in VC++, it is drawn correctly, but when I run the application there 's no gdiplus drawing anymore on the dialog, only gdi drawing are visible.
May someone help me?
thanks
|
|
|
|
|
I'm no expert on GDI+, but have you remembered your GdiplusStartup / GdiplusShutdown functions?
Iain.
|
|
|
|
|
I solved the problem :
Strangly, If the pen I am using to draw is instanciated before the GdiplusStartUp, there is no error, but the drawing are invisible with this pen...
So I declare my pen after GdiplusStartUp now.
|
|
|
|
|
Hi,
I intend to add voice recognition features to an application I'm developing in Visual C++. I'm comfortable in c++ and MFC and had planned to do research into the Microsoft Speech SDK 5.2 but I'm finding msdn has very little info on the Speech SDK.
Can anyone tell me if the Speech SDK has now been superseded by the SASDK, which appears to be ASP.net based.
Bearing in mind I've never touched ASP could anyone advise me where I need to focus my attention? I don't need dictation capabilities, purely command recognition.
Thanks in advance,
Simon
|
|
|
|
|
I'll bet you're familiar with this problem.
printf("this might crash: %s", integervalue);
In code with thousands of string formatting statements, at least some of them might be malformed.
Anyone has a solid solution to prevent this type of crash?
anyone seen good and secured string formatter code?
greetings,
Niko
|
|
|
|
|
USE sprintf rather than printf.
|
|
|
|
|
hmm.
this will crash too.
The question is not:
how can I format strings.
but
how can I prevent myself from crashes due to bad formatting parameters.
|
|
|
|
|
Your answer is innoportune. Are you sure you have read NikoTanghe's question ? He obviously used printf as an general example to illustrate the problem. This applies to sprintf, CString::Format, etc. as well.
|
|
|
|
|
The standard libraries IOStream libraries. That's what exactly what they're designed for.
int i = 1;
std::string s = "foo"
std::cout << i << s;
or in the case of printing to a buffer use std::ostringstream in preference to sprintf
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
As much as I dislike iostreams, I have to agree with Andrew. If the programmers can't get their formats straight then iostreams is an excellent choice.
Then again, if your programmers can't get their formats straight, you are going to have much more problems than just printing.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Try Boost format library. It provides type-safe formatting very similar to printf .
Robert-Antonio
"CRAY is the only computer, which runs an endless loop in just 4 hours"
|
|
|
|