|
void CWebBrowser2::ExecWB(long cmdID, long cmdexecopt, VARIANT* pvaIn, VARIANT* pvaOut)
{
static BYTE parms[] =
VTS_I4 VTS_I4 VTS_PVARIANT VTS_PVARIANT;
InvokeHelper(0x1f6, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
cmdID, cmdexecopt, pvaIn, pvaOut);
}
Actually its internally calling 'InvokeHelper' which may b using some
stack..
Reagards
Shiva
|
|
|
|
|
Can you show us what ExecWB() is doing?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
someobj.ExecWB(OLECMDID_PRINT, 0 , NULL, NULL);
I used MS-WebBrowser ocx(CWebBrowser2)
Reagards
Shiva
|
|
|
|
|
Whoops! I thought you had a different ExecWB() in your own namespace and asked for that code. I think agree with what David has said above.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
I don't see any problem there.
Don't you like such a behaviour?
BTW What is ExecWB ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
CPallini wrote: BTW What is ExecWB?
It's a method of both IWebBrowser2 and CHtmlView .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
What might be going wrong?? is it starting any new Process??? if yes, can i stop it? This ExecWb takin up huge memory (~20MB). i am sure about the huge number i mentioned (checked it in Task manager's Memory Usage - windowsXP). Any help is most appreciated or is there any other way that I can Print the html document (I am using CWebBrowser2).
Reagards
Shiva
|
|
|
|
|
Shivarudrayya H wrote: What might be going wrong??
Probably nothing.
Shivarudrayya H wrote: is it starting any new Process???
Probably not, since you see a huge increment of your application memory usage.
Shivarudrayya H wrote: his ExecWb takin up huge memory (~20MB).
Why bother about. After all, it is doing the job for you.
Shivarudrayya H wrote: Any help is most appreciated or is there any other way that I can Print the html document (I am using CWebBrowser2).
I don't know a lightweight approach, I'm not an expert about. Maybe CWebBroweser2 support some kind of configuration, but it is only a guess.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
What might be going wrong?? is it starting any new Process??? if yes, can i stop it? This ExecWb takin up huge memory (~20MB). i am sure about the huge number i mentioned (checked it in Task manager's Memory Usage - windowsXP). Any help is most appreciated or is there any other way that I can Print the html document (I am using CWebBrowser2).
Reagards
Shiva
|
|
|
|
|
Shivarudrayya H wrote: This ExecWb takin up huge memory (~20MB).
And why does this concern you?
Shivarudrayya H wrote: ...(checked it in Task manager's Memory Usage - windowsXP).
Which can be deceiving. Read this, especially the last part.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi Guys,
A have a client/server application using sockets (TCP/IP) for all the IPC needs. I came across a very interesting problem the other day and is still quite stumped by it:
When the apps are running on a local pc with the network cable not connected, then the apps run fine and the performance is as expected.
However, when the pc is then connected onto the lan the apps suddenly start behaving eratically. They will crash for no reason, or the data transfers between the client and server will become very slow, or timeout and all weird things happen.
I then unplug the cable and voila, all is fine again.
I have tested lots of other network apps on that same pc and they all seem to work fine. Does anyone have any idea as to what may be wrong or where I can start looking for the problem ?
Thanks
|
|
|
|
|
od@ananzi.co.za wrote: A have a client/server application using sockets (TCP/IP) for all the IPC needs...When the apps are running on a local pc with the network cable not connected, then the apps run fine...
How so?
Is your network being saturated with too many packets? Are you using any hubs or switches?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have started debugging the apps when on the network and most of the crashed do occur within the sockets/socket handler classes. The crashes are totally random at this stage ...
Is there an easy way to monitor the network for saturation and collissions etc ? (We do not have any measuring hardware) ...
|
|
|
|
|
Try using the loopback address (127.0.0.1), do not use hostnames or computer names.
I would also suggest doing stress tests, the crashs you describe should not happen. Perhaps the current implementation can not handle fragmented packets very well. TCP is a stream oriented protocol, which means data does not have to arrive in the same chunk sizes as they are sent away.
Hope it helps.
/M
|
|
|
|
|
Sorry, forgot to mention. I'm actually connecting to 127.0.0.1 already. I rarely use any hostnames, especially not when the client/server are running on the same pc.
I have an application layer running on top of the socket to reassemble the sent data at the receiver end. this layer has not changed over the last two year, so I'm fairly confident that the problem is elsewhere.
But where ??
|
|
|
|
|
What listening port are you using, could it be that incoming LAN traffic not meant for your application is crashing it? Just to make sure bind your listening socket specifically to 127.0.0.1 and not to INADDR_ANY . In any case, do stress testing to reproduce and isolate the trouble maker.
/M
|
|
|
|
|
Hi cool boys and girls!
I've written a code using MFC and ATL in VS 2005.
I included the following files in my apps local folder:
1- atl80.dll
2- mfc80u.dll
3- msvcr80.dll
4- Microsoft.VC80.ATL.manifest
5- Microsoft.VC80.CRT.manifest
6- Microsoft.VC80.MFC.manifest
It works well on many computers, but NOT "all of them".
I got a message like:
"The application failed to initialize properly (0xc0000135)."
Can anyone help me please?
modified on Monday, March 17, 2008 10:07 AM
|
|
|
|
|
Usef Marzbani wrote: I included the following files in my apps local folder:
Don't do that. Instead download vcredist_x86.exe (from here[^]) and execute it on the target machine. This will install all the MFC and C runtime libraries.
If you installed VC service pack 1, there is also a link at the bottom of the page to download the associated distributable package.
|
|
|
|
|
Hi, I've written a program in c++ (using DLL) which uses the function below to show the HDD Serial No (as assigned by Windows). The program works fine in DLL mode but when I try to convert it into a Static Library Visual Studio 205 returns this error. Could anybody help please? Many thanks
// Gets HDD serial No
char volumeName[MAX_PATH];
DWORD volumeSerialNumber;
DWORD maxNameLength;
DWORD fileSystemFlags;
char systemName[MAX_PATH];
// get the volume information for drive C
GetHDDserialNo = GetVolumeInformation("c:\\",
volumeName, MAX_PATH,
&volumeSerialNumber,
&maxNameLength,
&fileSystemFlags,
systemName, MAX_PATH);
|
|
|
|
|
Try this code:
TCHAR volumeName[MAX_PATH];
DWORD volumeSerialNumber;
DWORD maxNameLength;
DWORD fileSystemFlags;
TCHAR systemName[MAX_PATH];
GetHDDserialNo = GetVolumeInformation(_T("c:\\"),
volumeName, MAX_PATH,
&volumeSerialNumber,
&maxNameLength,
&fileSystemFlags,
systemName, MAX_PATH);
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
An absolute Genius! Thank you so much. But why is that?
|
|
|
|
|
Because you have UNICODE enabled, so a lot of functions from the Win32 API expect strings in UNICODE and not in ANSI. I suggest you search for articles on that subject here on codeproject, it is a bit broad to explain in one single post.
|
|
|
|
|
Hontesly no genius. Trust me, it is a simple thing. Read on Generic text mappings.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: Hontesly no genius.
Actually, you are a genius. Only geniuses swap not adjacent characters in a word the way you did.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|