|
If the enclosing document's URL is in a different domain than the frame's URL, IE won't let you access the frame, for security reasons.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
VB > soccer
|
|
|
|
|
Thanks a lot Mike,
but i have seen same thing is happened in other softwares.
is there any way to break this security.
waiting 4 reply.
|
|
|
|
|
It wouldn't be secure if there were a way for any old page/script to bypass it. Read up on cross-site scripting attacks to see why this security measure is important.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
VB > soccer
|
|
|
|
|
Thanks Mike,
Means it is not possible to access the frame document.
Harry.
|
|
|
|
|
I just only forbid contextmenu in mshtml control. The HtmlDocumentClass containt the event of HTMLDocumentEvents2_Event_oncontextmenu,so I write the code below ------------------------------------------
doc.HTMLDocumentEvents2_Event_oncontextmenu+=new mshtml.HTMLDocumentEvents2_oncontextmenuEventHandler(doc_HTMLDocumentEvents2_Event_oncontextmenu);
private bool doc_HTMLDocumentEvents2_Event_oncontextmenu(mshtml.IHTMLEventObj pEvtObj)
{
return false;
}
//
------------------------------------------------------
But the editor,mshtml control can not edit when the property of designMode is 'On' using keyboard.
Can you tell me why? And how to deal with the error? Thank you very!
Note:The question has been in the C# subject.
|
|
|
|
|
Hi all
My task is getting data of UPS using Windows Management Instrumentation(WMI) Win32_UnInterruptedPowerSupply class.
I have tested sample applications using WMI classes like Win32_Process,Win32_OperatingSystem they are working fine.But when iam trying to access Ups data using Win32_UnInterruptedPowerSupply class ,iam notgetting the output. I think there is problem with configuring UPS .
Please suggest and help me in configuring UPS and accessing UPS data.
Thanks
abhi
|
|
|
|
|
Hi all
My task is getting data of UPS using Windows Management Instrumentation(WMI) Win32_UnInterruptedPowerSupply class.
I have tested sample applications using WMI classes like Win32_Process,Win32_OperatingSystem they are working fine.But when iam trying to access Ups data using Win32_UnInterruptedPowerSupply class ,iam notgetting the output. I think there is problem with configuring UPS .
Please suggest and help me in configuring UPS and accessing UPS data.
Thanks
abhi
|
|
|
|
|
Hi,
I had started a COM DLL project about a year back. When I did a research on DLL back then, I found this is one of the more advance methods of doing it. Before I started the project, I was expecting it to be cross-platform and cross-language but it did not seems to be the case after I finish it. I had managed to get my DLL working for .Net, VB6 (with a bit of difficult for array passing) and VC6++ (which need extensive coding). I am still trying to figure out how to use it in Java.
I am currently wondering if this is the latest way of writing a DLL (I use the ATL COM wizard). I found out that VC6++ also offers MFC DLL and ActiveX ocx. Can anyone tell me what is the different between these 3? It seems that using the OCX method will help with reducing the coding when used in VC6++.
Again my questions are:
1. What is the latest method of writing a DLL?
2. What is the different between creating a DLL/OCX with ATL COM AppWizard, MFC ActiveX Control Wizard and MFC AppWizard?
Any information will be appreicated. As I am very keen in learning more about the technology available.
Thanks in advance.
|
|
|
|
|
Try to figure out what you want. DLL and COM have little relationship. DLL is a format of library and COM is a component technology. Almost all Windows libraries are delivered as DLLs, but only small portion of them are COM compoenets. You may create DLLs without knowing COM and COM components can be delivered as DLLs as well.
Do you want to create DLLs or COM components?
Best,
Jun
|
|
|
|
|
I know what I want, maybe you should read what I had written again before answering... Pardon me for my rudeness as I do realise that you seems to be very experience... one puzzling issue is that you recent replies do not seems to match your experience.. if fact it seems like an amateur
I said that I had did a COM DLL project, a DLL written in a form of COM component.
Currently what I found out was that written DLL in COM component is one of the latest way of writing a DLL. I just need to if there were any newer way of writing a DLL.
-- modified at 22:09 Wednesday 21st June, 2006
|
|
|
|
|
Just tried to help and learn.
I have to disagree that COM is a DLL technology. It's not.
Best,
Jun
|
|
|
|
|
Yes, I do understand that COM is not a DLL technology.
But it can be used to create a DLL and it is one of the more advance method of writing a DLL.
I was just hoping to know if there is any other methods to write a DLL other than this and the older method that exports the function.
I apologise for my rude reply again.
|
|
|
|
|
you can have a:
* .lib file which is a static linking library which exports c functions.
* win32 dll which exports c functions.
* mfc extension dll which exports c++ classes.
* com dll which exports ( export is not the right term but exposes)component
classes.
* u can have an ocx which again exports/exposes componentclasses
* u can have a .net managed dll which exports managed types.
All these are valid ways of creating a dll or a dynamic/static linking libraries.'
cheeeeeeeeeeeeeers ...milton kb.
|
|
|
|
|
Hello again,
how can i split CComBSTR Strings?
Example:
<br />
CComBSTR myStr = "iwantto-splitthis";<br />
Is it possible to split it by a special character like - to get two separate strings "iwantto" and "splitthis"?
Maybe I have to convert the CComBSTR to a readable format first.
<br />
LPTSTR myLptStr = new TCHAR[SysStringLen(myStr)];<br />
lstrcpy(myLptStr, OLE2T(myStr));<br />
But then, i still want to split it by -
Thanks in advance
|
|
|
|
|
The code you gave has problems. Firstly SysStringLen does not include an extra count for a NULL terminating character. You allocation should look like this:
LPTSTR myLptStr = new TCHAR[SysStringLen(myStr)+1];
Steve
|
|
|
|
|
Thanks for the hint, Steve.
Still lost with CComBSTR substr problem
|
|
|
|
|
One way:
CComBSTR myStr = L"iwantto-splitthis";
LPCWSTR pBegin = myStr;
LPCWSTR pEnd = pBegin + myStr.Length();
LPCWSTR pBreak = std::find(pBegin, pEnd, L"-");
if (pBreak!=pEnd)
{
CComBSTR FirstBit(pBreak-pBegin, pBegin);
CComBSTR EndBit(pEnd-pBreak-1, pBreak+1);
}</code>
This code assumes you've included <algorithm>
This is probably not the easiest or the best way but it should work (but I haven't tried it!).
Steve
|
|
|
|
|
Hi..
May any one tell me what is the best way to start learning COM programming?
"I am too late but i will never give up"
|
|
|
|
|
TheEagle wrote: May any one tell me what is the best way to start learning COM programming?
Programming.
Best,
Jun
|
|
|
|
|
May you tell me what is the best way to start learning COM Programming?
"I am too late but i will never give up"
|
|
|
|
|
Hi,
I managed to get myself started with one of the article in this forum that shows some very easy examples for beginers.
One think about COM is do you want the learn to do the full coding by hand. If that's the case, you may want to read up Essential COM which is highly recommended in this forum. It will show you some of the things that happen in the developement of the COM technology.
If you need to get something up fast, you may want to work with the ATL. There are plenty of articles on using ATL in this forum.
|
|
|
|
|
I have found them as you told me..thank you very much.
"I am too late but i will never give up"
|
|
|
|
|
Hi all,
I'm trying to put together a baseline example of integrating an ActiveX control with IE. I've built an MFC ActiveX control from the wizard and modified the OnDraw to draw a black ellipse rather than white.
My HTML looks like this:
<object id="activex"
CLASSID="CLSID:68D632F8-1644-44EA-9C71-725171D59E8E"
CODEBASE="http:AX2.ocx#version=1,0,0,1" height="300" width="300"/>
And the class ID is coming from the idl file:
[ uuid(68D632F8-1644-44EA-9C71-725171D59E8E), version(1.0),
helpfile("AX2.hlp"),
helpstring("AX2 ActiveX Control module"),
control ]
library AX2Lib
Does this look reasonably correct? Are there any references on ActiveX for IE that you'd recommend?
Marc
Pensieve
Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
|
|
|
|
|
<br />
CODEBASE="http:AX2.ocx#version=1,0,0,1"<br />
That http: looks rather odd there.
From the snippet it appears that you might be using the wrong classid. You need to make sure your .rgs file has the proper registration info in it as well.
Any reason you're using MFC and not ATL? Do you need the bloat?
Todd Smith
|
|
|
|
|
Todd Smith wrote: Any reason you're using MFC and not ATL? Do you need the bloat?
No, it was just a "start here and see what happens" attempt. You're the second person to recommend ATL, so, I'll investigate that next.
Marc
Pensieve
Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
|
|
|
|