|
Great> fieldInfo has embedded in it what I need. Many thanks!
ns
|
|
|
|
|
I have a problem:
I am trying to use stored procedures that return rows of data but not as output parameters.
When I execute the simplest of these with CRecordset derived class, I get a return status of -1 (which is what return_status is set to originally).
Is there any way to get the data returned by a stored proc without using output parms? I am using a CRecordset derived class.
Thanks
ashish
|
|
|
|
|
I am trying to interface with another application and I want to add text to a edit box in it. I have the HWND for the window but I can't figure out how to get text to show in the box.
I have tried to use WM_SETTEXT, but that isn't working. Is there another way I should be looking for to do this? Thanks.
Quinn
|
|
|
|
|
Is the HWND you've got the handle of the editbox, or of its parent?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have both the handle to the parent and the handle to the control. I use FindWindow to get the parent and FindWindowEx to get the control HWND.
|
|
|
|
|
Ummm... it should work. Things you can do to locate the problem:- Make sure you spotted the right parent window by sending the
WM_SETTEXT message to it --the window caption should change accordingly.
- Make sure the handle actually belongs to the edit box using Spy++, a little utility that comes with VC++ and is able to inspect the internals of currently active windows.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have been using SPY++, but thanks for suggesting it. That's how I made sure I had the rigth window. One of the things I've noticed with some testing is that this is a subclassed control. Also with SPY++ I can see that the control has a 'caption' to it that says 'trillian display' and when I use the WM_SETTEXT to the control it will change that value. But nothing shows anywhere. SPY++ also showz that the control class is 'trillian display'
Does that help narrow down the possibilities any?
|
|
|
|
|
i used something similar to u before, but not WM_SETTEXT.
i had HWND of a window in another app, i used PostMessge to send a set of command (different numbers) for communicating between the 2 apps.
i suggest u try PoseMessage(hwnd_Peer, WM_USER+???,a_number,0) first to see if another app can receive the message with a number, it should be OK.
i only suspect u can't send a string from one app to another, but not sure, because COM can't send a string in this way vs its method.
includeh10
|
|
|
|
|
I don't see any info on PostMesage in the MSDN, where can I find some info on that?
(edit - nevermind I found the page in the msdn)
|
|
|
|
|
sorry, right function name is : PostMessage (return at once) or SendMessage (return after executing).
includeh10
|
|
|
|
|
I'm afraid you're out of luck. This control is not a standard edit box and seems not to be using the "caption" as the displayed message (which is how edit boxes behave). Maybe there's some custom message than can be used to set this control's content, but unless you've got additional info this is like looking for a needle in a haystack.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Yea, that is kinda what I was thinking too. but there has to be a away, I must be able to make the computer do as I wish, hehe. So I guess I email the programmers of the program and see if they will help me any.
Thanks for all your help, and if any more information about this can help me, please let me know.
Quinn
|
|
|
|
|
Hey everyone. I'm trying to get the CInternetSession class do asynchronous fetching of web pages and I'm having some troubles. I have my class derived from CInternetSession (cleverly named "IgnorantInetSession" since it should essentially ignore results) and I keep getting assertion errors when the object is initialized. The class declaration is:
class CIgnorantInetSession : public CInternetSession
{
public:
CIgnorantInetSession(LPCTSTR pstrAgent = NULL,
DWORD dwContext = 1,
DWORD dwAccessType = PRE_CONFIG_INTERNET_ACCESS,
LPCTSTR pstrProxyName = NULL,
LPCTSTR pstrProxyBypass = NULL,
DWORD dwFlags = 0);
virtual ~CIgnorantInetSession();
void CIgnorantInetSession::OnStatusCallback(DWORD_PTR dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInformation,
DWORD dwStatusInformationLength);
};
In the constructor, I call EnableStatusCallback(TRUE); - this throws the asssertion problem. The function implementing the callback looks like so:
void CIgnorantInetSession::OnStatusCallback(DWORD_PTR dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInformation,
DWORD dwStatusInformationLength)
{
CInternetSession::OnStatusCallback(dwContext, dwInternetStatus,
lpvStatusInformation, dwStatusInformationLength);
}
Does anyone know what's going on here? Thanks!
Luke Reeves (LukeyBoy)
luke@oceanlake.com
|
|
|
|
|
Accoring to MSDN, to handle any operations asynchronously, three conditions must be set: - In the constructor, dwFlags must include
INTERNET_FLAG_ASYNC .
- In the constructor,
dwContext must be set to one.
- You must establish a call back function by calling
EnableStatusCall() . /ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Yeah, I do exactly that. The call to the constructor is:
CIgnorantInetSession session(0, 1, PRE_CONFIG_INTERNET_ACCESS, 0, 0, INTERNET_FLAG_ASYNC);
session.EnableStatusCallback(TRUE);
It should work just fine, but it still doesn't.
|
|
|
|
|
Where does it assert?
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
That's not helpful. Please post the exact condition that asserted. My INET.CPP line 415 is the arglist of the constructor.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Debug Assertion Failed is the message, then a generic RTFM blurb. The actual assert statement is:
ASSERT((dwFlags & INTERNET_FLAG_ASYNC) == 0);
|
|
|
|
|
I recall this annoying problem - caused by bogus MS doc. Hang on a sec while I find my fix...
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Can you try using INTERNET_OPEN_TYPE_PROXY instead of INTERNET_FLAG_ASYNC ?
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
This[^] is the query similar to yours. I wish MS would fix their online docs.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Still no go. Now I get an assert error in inet.cpp, 645 (when I enable the callback). The line is:
ASSERT(!m_bCallbackEnabled);
|
|
|
|
|
Ugh. I'm going to dig some more...
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Here's[^] an alternate approach. I'm still looking for the fix...
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|