|
I call the function 'Navigate2' of IWebBrowser2 interface as following:
_variant_t varURL(_bstr_t("www.codeproject.com"));
_variant_t varMyHeaders(_bstr_t("Cookie: JSESSIONID=0000Fkdkdaourejlasdfa"));
_variant_t varFlags((short)navOpenInNewWindow);
_variant_t varTargetFrameName(_bstr_t("_BLANK"));
_variant_t varEmpty;
m_pWebBrowser->Navigate2(
&varURL,
&varFlags,
&varTargetFrameName,
&varEmpty,
&varMyHeaders);
But the content of varMyHeaders is not added to the default Microsoft Internet Explorer headers. I don't know what the problem is.
Is there anybody who met similar problems? Any suggestion will be appreciated. Thanks very much.
|
|
|
|
|
I think the problem is that the headers are a byte array rather then a unicode string.
This is from MSDN.
The post data specified by PostData is passed as a SAFEARRAY Data Type structure. The variant should be of type VT_ARRAY and point to a SAFEARRAY Data Type. The SAFEARRAY Data Type should be of element type VT_UI1, dimension one, and have an element count equal to the number of bytes of post data.
If you don't kill me you will only make me stronger
That and a cup of coffee will get you 2 cups of coffee
|
|
|
|
|
Hi,
In your example you use www.codeproject.com, in your real application do you use "http://www.yoururl.com" ?
Only here is an exert from MSDN (I've bolded the relevant part):
------------------
Headers
[in] Pointer to a value that contains the HTTP headers to send to the server. These headers are added to the default Microsoft Internet Explorer headers. The headers can specify things such as the action required of the server, the type of data being passed to the server, or a status code. This parameter is ignored if a URL is not an HTTP URL.
I've used the following in a previous app. and it added the headers fine:
strURL = "http://server1/CustomApp/validate.asp";
COleVariant vtEmpty;
long lFlags = 4;
m_ctlWeb1.Navigate2(COleVariant(strURL),
COleVariant(lFlags, VT_I4),
COleVariant("_self"),
&vtEmpty,
COleVariant("CUSTOM:1\r\fXYZXYZ:1234\r\f"));
Hope this helps,
Andy
|
|
|
|
|
Hi!
I have an object which I need to check regularly. I want the following:
1. a member storing when the object was last checked
2. a member storing the length of time between checks
This is for when I run my program if I check the current time vs the last checked time and then determine if the length of time between checks has been exceeded I can then perform an update.
My question is what should I use to store these members? Should I use a SYSTEMTIME structure or is there a better method? Can I compare SYSTEMTIME with the current time and do operations like subtract to find if the length of time between checks is exceeded?
Are there any problems with using SYSTEMTIME?
|
|
|
|
|
Something like:
class CMyObject
{
public:
void Check( void )
{
m_timeLastChecked = COleDateTime::GetCurrentTime();
}
void GetCheckAge( COleDateTimeSpan &timeAge )
{
timeAge = COleDateTime::GetCurrentTime() - m_timeLastChecked;
}
private:
COleDateTime m_timeLastChecked;
};
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thanks
I have never used that class before. Is there any particular reason why to use it instead of SYSTEMTIME or CTime? Looking at it I may also use COleDateTimeSpan to store the time between checks.
|
|
|
|
|
Anonymous wrote:
Is there any particular reason why to use it instead of SYSTEMTIME or CTime?
A CTime object is only good from January 1970 through January 2038. A COleDateTime object covers that range and a lot more.
Anonymous wrote:
Looking at it I may also use COleDateTimeSpan to store the time between checks.
What's to store? If you are wanting to know the elapsed time since the last check, you'd be comparing the last-checked time against the current time.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
DavidCrow wrote:
What's to store? If you are wanting to know the elapsed time since the last check, you'd be comparing the last-checked time against the current time.
I also need to store a timespan I think. This is so I can store an amount of time like 30 days. I can then decide if an update must be done by looking at the last time an update happened then adding the timespan which is the length of time between updates and then comparing with the current time.
It will be like looking for web updates every 5 10 or 30 days depending on a user setting.
|
|
|
|
|
Hi !
I'm trying to develop an hyperterminal-like application in VC++.
I use a CEdit control for logging data coming from a serial com port.
The problem is that I didn't find a good way to add text in the CEdit control.
This works too slow, and gives flickering effects.
Any advise will be welcome !
Thanks in advance.
Jeje.
|
|
|
|
|
Jeje wrote:
The problem is that I didn't find a good way to add text in the CEdit control.
What way(s) did you find that was not good?
Have you looked at ReplaceSel() ?
Yoiu could also add the incoming data to a CString object and then call SetWindowText() once.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
I de-installed visual studio.NET. Recently I found out that the de-installer didn't remove the JIT debugger regestry settings from my system.
Now, when a program crashes, the debug dialog appeart and asks me if I want to debug the application. When I hit the retry button (to debug), I get this really annoying message box that says that the JIT debugger canno't be found. It also asks if I want to use the old debugger msdev.exe
After sweeping the geristry manually and removing every VS.NET and JIT entry I could find, the dialog still appears.
Does anyone know how I can solve the problem?
Thanks
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I solved the problem!
I just don't know why I didn't think of enabling the Just In Time debugger from VS 6.0
On the other hand, my registry is clean(er) than it was before
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Did you check this one?
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Aedebug
In "Debugger" String i have:
"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\msdev.exe" -p %ld -e %ld
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I have the same key, but there was another key: "PreVisualStudio7Debugger". Now I have removed the key..
You never know how much garbage an uninstaller leaves around...
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
it is interested at windows system registery. You must clean this from windows system registery.
|
|
|
|
|
Hi,
Is there a method to replace a message to the top of the application message que.
Thanks and best regards.
Erkan Ermis
|
|
|
|
|
Hello,
I don't think that there is a function to replace a message to the top of the message qeue. But you can use SendMessage for immediate processing (the message won't be placed in the message qeue)
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I use client/server application,that's wrote in c++.I would like to show all connected clients to server in windows system monitor.Can someone help me?Thankx
reply to this message
|
|
|
|
|
Check out NetUserEnum() , NetSessionEnum() , and NetWkstaUserEnum() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
but it's thread application and the server was with COM technologie developed.
I use one variable iClientsCount it means how much connected clients and i would
like the show this variable in system monitor.
RRfun
|
|
|
|
|
So iterate through each connection and increment iClientsCount . Or, you could look at the fifth parameter which receives the count of items actually iterated. What's wrong with that?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello all,
While building my vc++ project i am getting error:
Cannot start tool.
Error spawning 'vcspawn.exe'. The build could not be performed.
I have set the environment variable.
could you please suggest some solution.
Regards,
JP
|
|
|
|
|
Can you see the requested binary in your bin folder?
(VS6.0 C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin)
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Yes vcspawn.exe is there in the bin folder.
Regards,
JP
|
|
|
|
|
Do you have that path in the PATH enviroment variable?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|