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?

View 2 Replies


ADVERTISEMENT

Visual C++ :: Passing Pointer Into ActiveX Control?

Oct 21, 2012

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.

View 2 Replies View Related

Visual C++ :: How To Add Images To Toolbar Buttons For Activex Control

Aug 8, 2013

//#import "c:windowsSysWow64mscomctl.ocx" raw_interfaces_only //in window7

using namespace MSComctlLib;
CComPtr<IButtons> pButtons;
CComPtr<IButton> pButton;
CComPtr<IImages> pImages;

[Code] ....

View 11 Replies View Related

C# :: ActiveX Control In Separate Thread

Jun 19, 2014

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:

private void RetrieveMails() {
PlayFlashMovie();
RetrieveMailsFromServer{};
StopFlashMovie();
}

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...

View 2 Replies View Related

C# :: Select Dynamic Web Browser From Tab Control

Sep 3, 2014

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";

[Code] ....

View 1 Replies View Related

Visual C++ :: ActiveX For Video Server

Jan 13, 2015

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?

View 2 Replies View Related

Visual C++ :: Adobe ActiveX Integration

Mar 17, 2014

I'm trying to open PDF file in my MFC application. For this I have installed Adobe Reader 10 and added the ActiveX from resource editor to my dialog.

Created a variable of that type and trying to use that. Class wizard has generated "class CPdf1 : public CWnd" for me and that's added to project.

Now when I'm trying to create the control window getting Assertion failure. Using the below code in my OnInitDialog / some button clicks.

Code:
m_PDF.Create(_T("Reader Window"), WS_CHILD | WS_VISIBLE, CRect(0, 0, 200, 300), this, 2009);

Am I missing some steps ?

View 4 Replies View Related

Visual C++ :: Writing To Named Pipe Coming From A Service (session 0) Without Admin Rights

Dec 9, 2014

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.

This is the code:

Service (session0) SERVER

Code:
DWORD WINAPI PipeThreadRSVS(void* pParameter){
LPTSTR _PIPE_NAME = "\.pipeRSVHPipeIn";
bool Break=false;
char Received_Buffer[BlockSize+16];
DWORD BytesRead = 0;

[Code] ....

View 2 Replies View Related

Visual C++ :: Debug Assertion On ActiveX Create

Oct 10, 2013

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.

What I observed in the OCCSITE.cpp:

Code:
_AFX_THREAD_STATE* pState = AfxGetThreadState();
if (!pState->m_bNeedTerm && !AfxOleInit())
return hr;

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...

View 1 Replies View Related

Visual C++ :: Automation MS Word In ActiveX Container

Jan 20, 2014

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:

Code:
void CXContainerView::CreateWord() {
::CoInitialize(NULL);
_Document doc;
_Application m_app;
LPDISPATCH lpDisp;
CLSID clsid;

[Code] ....

It works in debug version but falls in release. Feels my fifth point, what I call it in the wrong way.

View 6 Replies View Related

Visual C++ :: Closing MFC Application From Command Prompt

Jul 31, 2013

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.

View 8 Replies View Related

Visual C++ :: Resource Editor Failed To Initialize ActiveX

Feb 27, 2014

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.

View 6 Replies View Related

Visual C++ :: Is It Worthwhile To Write ActiveX Module Dedicated To Drawing Charts

Oct 22, 2014

I know the user installation must involve some registry manipulations and some other trickery. But the ActiveX way seems to be more modular.

Is it worthwhile to separate the charting modules from the exe and make an activex dll for this purpose?

View 5 Replies View Related

Visual C++ :: Create Web-browser With ATL?

Aug 11, 2013

I'm trying to create a simple webbrowser at my app.

code sample:
....
ATL::CAxWindow m_wndContainer;
ATL::CComPtr<IWebBrowser2> m_spWebBrowser;
HWND hWnd = m_wndContainer.Create(NULL,
CRect(0,0,200,100),
(LPCTSTR)0,
WS_CAPTION|WS_THICKFRAME|WS_OVERLAPPED|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
CoCreateInstance(CLSID_WebBrowser,NULL,CLSCTX_INPROC,IID_IWebBrowser2,(void**) &m_spWebBrowser);
...

everything is work fine except the fact the it seems that it create an IE version 7.0 and my machine have IE 8 installed.

it not suppose to create the IE according to my installed version?how do i suppose to do it?

View 1 Replies View Related

Visual C++ :: Iterating Through Web Browser Controls?

Jan 31, 2013

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'm using Visual Studio 2010, programming in C++.

View 6 Replies View Related

Visual C++ :: Creating DLL With Web Browser Embedded?

Sep 17, 2013

My earlier attempt to get an answer didn't work, so i want to make my question more straight forward.

Is it possible to create a C++ DLL with Web Browser like CDHtmlDialog embedded in it?

View 1 Replies View Related

Visual C++ :: JSON Undefined In Web-browser Container

May 19, 2013

I create an IWebBrowser2* object and attached it to new window.

I create also a simple html page containing JScript alert(JSON) command.

when i load the page from IE the page works fine.but when i load the page from my object i get JSON undefined.

do i need to set my object with some setting?

View 1 Replies View Related

Visual C++ :: Display CDialog App Inside A Web Browser Like IE

Dec 16, 2013

I am making a dialog app using CDHtmlDialog and all the controls are done using HTML.

Now i want to call/display this dialog inside a web browser like IE.

How can i do that?

If i could generelaize this question -

Is it possible to display a dialog app that is derived from CDialog inside IE?

If possible, how to do that?

View 7 Replies View Related

Visual C++ :: Calling ATL COM DLL Method (that Opens A Dialog) From Browser?

Oct 11, 2013

I have a COM Object created using ATL (without MFC Support)

The Object has 1 method that opens a Dialog (that does all the rest) and when finish - returns 2 values back (1 is enough)

Currently I call it from another EXE:

hr = CoCreateInstance(
CLSID_MyControl,
NULL,
CLSCTX_INPROC_SERVER,
IID_IMyControl,
(void**) &pMyControl
);

and then:

hr = pMyControl->MyMethod (ATL::CComBSTR(InputString1), ATL::CComBSTR(InputString2), &IntReturned, &IntReturned);

Is it possible to call it as is from a browser ?

How can I Instantiate the object and invoke my method (with params) from the browser ?

will it open the dialog ?

View 3 Replies View Related

Visual C++ :: MF Dialog App - Deleting HBITMAP Object

Mar 6, 2015

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;

[Code] .....

View 9 Replies View Related

C :: Connect Program To Windows Session ID

May 16, 2013

I need to get the Win OS Session name to a string in C. How can I get to that?

View 1 Replies View Related

C Sharp :: Session Expired Message Show

Feb 27, 2013

How I message show, when session expired?

without web.config

I am working on visual Studio 2008(3.5)

View 1 Replies View Related

Visual C++ :: Customize Control Scrollbar

Jan 16, 2015

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:

Code:
HBRUSH CMyListBox::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) {
HBRUSH hbr = CListBox::OnCtlColor(pDC, pWnd, nCtlColor);

// TODO: Change any attributes of the DC here
// TODO: Return a different brush if the default is not desired

if(CTLCOLOR_STATIC == nCtlColor) {
pDC->SetTextColor(RGB(200, 34, 0));

[Code] ....

I colored everything, except scrollbars ) ... I attached the app demo ...

I already tried this solution: [URL] ....

but in my case, didn't worked ...

My question is, how can I color the control scrollbar ? It is possible ? If yes, how ?

View 14 Replies View Related

Visual C++ :: How To Control Toolbar Dynamically

Sep 21, 2013

I want to control my toolbar dynamically.

First I added tool bar with style including TBSTYLE_EX_MIXEDBUTTONS | TBSTYLE_LIST.

Then added the tool bar to a rebar. I added tool tips by handling TTN_GETDISPINFO.

Everything works fine. But when I try to add text to right of the button, the text
gets added but button size is not automatically changing.

The following code is not working .

void SetToolbarText(HWND& hwndToolbar,LPTSTR szText)
{
ATLASSERT(::IsWindow(hwndToolbar));
TBBUTTONINFO tbbi = { 0 };
tbbi.cbSize = sizeof(TBBUTTONINFO);
tbbi.dwMask = TBIF_TEXT;// | TBIF_SIZE;//if I add TBIF_SIZE code will work!
tbbi.cchText = 0;
tbbi.cx = 200;

[Code]...

View 1 Replies View Related

Visual C++ :: MFC List Control Position?

Feb 4, 2015

I have a mfc project with a List Control (Report View).

When I run the project, the list control appears in the middle of the window instead of appearing where I placed it.

Is there a qay to make it stay where I need it?

View 2 Replies View Related

Visual C++ :: Child Window On Top Of Control

Nov 30, 2014

I have a child window above an edit control.

When the position of the control in the parent in the child on top of it is clicked the control gets topmost. Is there any way to prevent this?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved