Visual C++ :: ActiveX Web Browser Control Not Deleting Session Cookies Even After Closing
Aug 9, 2013
I have an C++ application which uses Microsoft Web browser ActiveX control to launch any URL within the application. The browser is embedded in C++ form and It's working fine with all the feature Microsoft has exposed through Interface(IID_IWebBrowser2).But while any url that is using session cookie has been launched, even after closing the browser the session cookies are not getting deleted. For example if user login info is stored as session cookies,the url is using the cookies and getting launched without asking for user log in info.
But if I close the browser, and again relaunch , the cookies should be deleted and the url will not find the cookies to be used for log in . That is not happening here. Although this is session cookies , it's not getting deleted and being used by embedded browser. However, if the url is launched in IE, it is behaving as expected.
So, Do I need to delete the cookies explicitly? If Yes, How to do that?
I'm writing an ActiveX control. In one of the functions I'd like the user to be able to pass me a pointer to a buffer that they created which I can then fill with data and return a success/error code. What's the appropriate way to do this? I was thinking about just using an OLE_HANDLE type for the parameter and then casting that to pointer inside the OCX but I'm not sure if that's safe or the right way to do it.
I have a method that does some extensive work (retrieves a list of emails from an imap server). What i wanted was to add a flash movie that would start playing when the method is entered and will stop when the method finishes. Something like this:
The flash movie plays, but the speed is horrible, almoust frame by frame (it actually matches the stepping of the foreach method that fetches the mails from the server as i can see it retrieving one mail - the movie plays one frame and stops; retrieves another mail - the movie plays another frame and stops.).
In the loop that retrieves the messages, i added Application.DoEvents(); so that is not the problem.
Now i am thinking of somehow playing that flash movie on a separate thread that will not hang synchronous with the retrieving mails loop but i don't know how would i do that...
I have been working on my own custom web browser. If i insert a web browser in my tab control and name it i can easily just go webbrowser1.Navigate() in my button click to use the webbrowser methods.
I made a method CreateTab and it automatically adds a web browser to my tab along with a default web page. My problem is selecting this webbrowser in other button clicks so i can call Home, Back, forward, etc.
Here is me method for creating a tab.
private void CreateTabItem() { //create a new tab TabItem item = new TabItem(); item.Header = "Fitness" + i ; WebBrowser browser = new WebBrowser(); //browser.Name = "Website";
I would like to know in which way is the best to make ActiveX control for video. ActiveX control will need at least show picture and be able to go back in past, change resulation of picture and similar. How complex it is to do something like that? Is MFC best way to make it? Is there somewhere similar code?
I'm trying to write to a named pipe created by a service, as we all know the session 0 isolation implemented in vista and forward makes this task a bit complicated.
well at this point i managed to make almost all to work but my real problem comes when i try to write on the named pipe from my GUI application with no administrator rights
If i run the GUI application with admin rights it works 100% but, I don't need that application to require the user admin rights and for security reasons i rather to leave it without admin...
so i started my research and i found that there is a way to achieve this by calling CreateNamedPipe() with a low integrity security attributes...
well how to implement but i finally made it, the problem is that it gets worse than passing null security attributes, it works with admin rights with NULL security attributes, but when i pass the low integrity security attributes it gives "access denied" even when using admin rights, so i guess im passing the wrong security attributes but how to manually create the security descriptor string.
I have a MFC Com Dll that has a CDialog. In the OnCreate event I create an ActiveX control. The dll is hosted inside an executable of mine. In this scenario everything works fine!
The dll is also called from an external executable and then a Debug Assertion in OCCSITE.cpp occurs when I create the ActiveX control. I suspect that in the executable there is no AfxOleInit. I spend some time with this problem and tried to CoInitialize, OleInitialize, AfxOleInitModule and even AfxOleInit in the dll. But all that does not change a thing. If I understand the mechanics then this is an intended behaviour and should be done in the host exe.
In my executable m_bNeedTerm is 0 and in the external one (where the ActiveX does not work) it is -1. In AfxOleInit this is explained as a special flag to prevent the dll from doing an unnecessary OleInitialize. But as I said even if I call OleInitialize myself I get the Debug Assertion and the ActiveX is not visible.
Is there anything I can do to make the ActiveX control work in the external application? Obviously I cannot Change anything in the application...
I`m working with MS Visual Studio 6. Trying to connect Word server with my window. This is call server in my class CXContainerView, inherit from CScrollView:
I have created a MFC dialog based application. Now I want to implement such a functionailty that I will be closing my application through command prompt. And while closing of my application the ExitInstance() method of my application should get called. What is the command which I should put in the command prompt to close my application in such a way.
I'm working on a project which consists of several ocx loaded by one exe. The platform is WinCE. Now I'm on a process to create a new ocx. I do have a copy of those ocx projects in Win32 platform. These Win32 versions were only used to register ocx in local system and then put those on to application dialog by 'Insert ActiveX'.
Now the problem is those Win32 projects are so outdated, and unable to build. Getting too many linking errors to be solved.
I have build the new ocx and link that with exe manually by editing .rc file and all. But still no luck. New ocx is getting registered in WinCE device but failing to start application.
there is a way to iterate through the controls on a webpage. For instance, I tried EnumChildWindows using the parent window of the browser, but I haven't had any luck - it returns nothing. s where I can start researching how to find the child controls?
I have a little demo of a bitmap button that simply uses CButton and resource bitmaps in an MFC dialog app. The intent is to click on the button and have the bitmap image change. My code works ok the first time around, but crashes on repeat clicks. I have interpreted this as failure to properly delete the HBITMAP object, though I could be mistaken. In any case the app works ok in Release configuration but violates assertion in Debug.
Code:
ASSERT(m_hObject == NULL); // only attach once, detach on destroy[code] // dialog header // Attributes protected: HBITMAP m_hBitmap1; HBITMAP m_hBitmap2;
I get a task: to color the control scrollbar (a gridctrl scrollbar, whatever). In the first attempting I didn't succeded ... So, I started to trying coloring a CListBox scrollbar ... I developed a derived CListBox where I override OnCtlColor: