|
hello every one
I make an ActiveX using Flash.ocx, i didn't create a window for Flash control, just use windowless object(IOleInPlaceObjectWindowless).
and i use OleDraw() to draw the Flash content to my HDC:
OleDraw(pFlashViewObject, DVASPECT_TRANSPARENT, hDC, &rc);
Everything is good in the "ActiveX Control Test Container", the Flash content is drawn.
but when i use my ActiveX in Internet Explorer, the OleDraw() draw nothing!
the HRESULT is ok, but hDC is just white(i save it to a BMP file)!
I test my ActiveX on some other browers(support ActiveX), they work fine too!
only IE has this problem! IE don't like an ActiveX(mine) OleDraw another ActiveX(Flash.ocx)??
Is it a security problem of Internet Explorer? (i mean: IE prevent calling OleDraw or something else from my ActiveX to Flash.ocx??)
i want to draw Flash content to my ActiveX's HDC, and use it on IE browser, is there any solution??
|
|
|
|
|
I have an activex control, written using MFC that is embedded on a web page with the Object tag and the following properties:
PARAM NAME="_Version" VALUE="458752"
PARAM NAME="_ExtentX" VALUE="9843"
PARAM NAME="_ExtentY" VALUE="7373"
PARAM NAME="_StockProps" VALUE="1"
Can anyone give me some detail as to what each property means (links to some documentation would be great also). I have seen these properties on a number of controls on the web.
|
|
|
|
|
Hello All,
I have written a small plug-in in Eudora. This plug-in adds two menu-item in the Tool menu also on toolbar. I have also handle there events using EMS-API. But in that event i want header part of currently selected mail.
How can i get Header information in ems_special_hook function?
Hoping for your kind co-operation.
Thanks
|
|
|
|
|
anyone knows solution of this error......
Error HRESULT E_FAIL has been returned from a call to a COM component.
|
|
|
|
|
Well, you know the question is a bit vague...
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
[My articles]
|
|
|
|
|
OIOIC is a completely new object-oriented mechanism for the C programming language.
Please download the "OIOIC-Primer-2nd-Edition-English.tar.gz". (the English version of << OIOIC Primer >> )
http://code.google.com/p/oioic/downloads/list
Welcome your advice!
Using OIOIC, you can describe the flower, birds, grass, insects, trees, houses ...
Using OIOIC, you can describe the elements, atoms, protons, electrons ...
Using OIOIC, you can describe the earth, the sun, the Milky Way galaxy, collapsar ...
Using OIOIC, you can describe ...
1. OIOIC perfectly supplies the gap of object-oriented technology for the C programming language;
2. OIOIC perfectly solved the multiple inheritance problem in the Software World;
3. OIOIC perfectly objectivizes multithreading access control of object;
4. OIOIC unifies the norm of components in the Software World;
5. OIOIC unifies the structure of code tree in the Software World;
6. OIOIC unifies the thinking of object-oriented programming in the Software World;
7. OIOIC unifies all advanced programming languages in the Software World, to make the C programming language as the preferred.
modified on Wednesday, March 11, 2009 9:54 PM
|
|
|
|
|
I have packed the English version individually.
Please download the "OIOIC-Primer-2nd-Edition-English.tar.gz". (the English version of << OIOIC Primer >> )
http://code.google.com/p/oioic/downloads/list
|
|
|
|
|
As a beginner I have a question for those of you who know far more than I do. My built in infrared device on a Compaq 98SE platform gives an initialization error 45, which I think is not a driver issue.
This infrared device is on LPT3 and COM4. However, ‘mode com4’ in DOS returns an illegal device message AND under debug- COM4 has a value of 00 00. The com address actually used by the Infrared device (3E8) is shown under COM3 instead of COM4 !! COM3 also returns an illegal device message with the mode com3 command. Does this explain my Infrared initialization error?
Thanks
|
|
|
|
|
Hi,
This is COM as in Component Object Model rather than COMmunication port, but I mistakenly bought 'Inside COM' (Dale Rogerson) when working on ports and then a few months later got a job that lasted 10 years 'cos I new all about COM!
Anyway, there is various stuff on the net such as this [^] saying BIOS does'nt recognise COM3 and 4.
DOS often has a problem with COM3 and COM4, again there's lots on the net. I think its usually assumed that the Operating System e.g. Windows will handle 3 and 4 etc OK so it doesn't matter at the BIOS level.
|
|
|
|
|
All 4 COM ports are listed in win.ini with default settings shown. I know from other Freeware diagnostic programs that COM1-4 exist. COM4 is probably virtual, because it does have 00 00 value in debug and is not recognized by the mode command. But in Modems Properties -> Diagnostics, COM4 displays as having no address or settings, all blank. COM2 is used by the modem, which works. My Compaq bios settings only allow me to enable and disable ports. No other options.
The main main clue is that COM3 shows the address for the Infrared Device, and this port does not open. Whereas the Infrared Device is seeking and using COM4, and I get an initialization error when opening IR on my computer.
|
|
|
|
|
Sorry I can't help. All I can suggest is perhaps post your problem on the Code Project Hardware & Devices forum.
|
|
|
|
|
Please anyone help me where am doing wrong.
Dim AcadApp As AutoCAD.AcadApplication
Set AcadApp = CreateObject("AutoCAD.Application")
when i am executing the above code it i working fine.
Dim tempLine As AutoCAD.AcadLine
Set tempLine = CreateObject("AutoCAD.AcadLine")
when executing this one, i am getting "ActiveX component can't create object"
Thanks in advance
|
|
|
|
|
You probably have to create a drawing in your application, say, AcadApp.NewDrawing() (just guessing here, though it may be a model then a drawing) then in your created Drawing do Drawing.AddLine(pt1, pt2)
|
|
|
|
|
Hi,
Are you sure the AutoCAD.AcadLine is COM object? You can check in Registry if you not able to find any where else and look for this ProgID.
-
|
|
|
|
|
I wrote managed C++ code to call a COM methods. I got message "cannot convert parameter 1 from 'double *' to 'double %'" from Visual Studio compiler. Does anybody know what is the type 'double %'?
|
|
|
|
|
This is the wrong forum.
% in C++/CLI is a managed reference.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
«_Superman_»:
Thanks. But how to call a function with parameter of managed reference type? For example,
COM:
STDMETHODIMP CTester::Total(DOUBLE* a, LONG count, DOUBLE* total)
{ ... }
Client:
int main(array<system::string xmlns:system="#unknown"> ^args)
{
double a[] = { 1.0, 2.0};
long count = 2;
double total;
ManagedReferenceComLib::TesterClass tester;
tester.Total(a, count, &total);
return 0;
}
Compiler gave
error C2664: 'ManagedReferenceComLib::TesterClass::Total' : cannot convert parameter 1 from 'double [2]' to 'double %'
Larry
|
|
|
|
|
Hi everyone,
I'm trying to send a COM object over a MSMQ message in C++. This is my object :
class ATL_NO_VTABLE CAnalisis :
public CComObjectRootEx<ccomsinglethreadmodel>,
public CComCoClass<canalisis,>,
public ISupportErrorInfo,
public IDispatchImpl,
public IPersistStreamInit
{
private:
typedef struct {
DOUBLE size;
float color;
float light;
BSTR imgName;
BSTR uname;
} Image;
Image img;
</ccomsinglethreadmodel>
Everything goes fine and I can get the whole object but the BSTR types. Floats and integers are properly sent and received. But the BSTR types dont work. I'm trying to send strings and can't find the way. I did try with VARIANT instead and the result was wrong too. Somehow, it looks like the strings are not serialized.
These are some of the get and set functions for my ATL component:
This one works fine:
STDMETHODIMP CAnalisis::getLight(FLOAT* light)
{
*light=img.light;
return S_OK;
}
STDMETHODIMP CAnalisis::setLight(FLOAT light)
{
img.light=light;
return S_OK;
}
This one doesn't :
STDMETHODIMP CAnalisis::getImgName(BSTR* imgName)
{
*imgName = img.imgName;
return S_OK;
}
STDMETHODIMP CAnalisis::setImgName(BSTR imgName)
{
img.imgName=imgName;
return S_OK;
}
and this is the way I create the MSMQ message and fill the values in my producer :
IMSMQQueueInfosPtr pQueueInfos;
IMSMQQueueInfoPtr pQueueInfo;
IMSMQQueuePtr pQueue;
IUnknownPtr pIUnknown;
IMSMQQueryPtr pQuery(__uuidof(MSMQQuery));
IMSMQMessagePtr pMessage(__uuidof(MSMQMessage));
IAnalisisPtr pAnalisis(__uuidof(Analisis));
WCHAR * imagen;
imagen = L"imagen1.jpg";
pAnalisis->setImgName(imagen);
(...)
pAnalisis->setFruitSize(20.00);
(...)
pQueueInfo = new IMSMQQueueInfoPtr( __uuidof(MSMQQueueInfo) );
pQueueInfo->PathName = "MYCOMPUTER\\private$\\myprivatequeue";
pQueue = pQueueInfo->Open(MQ_SEND_ACCESS, MQ_DENY_NONE);
pMessage->Body = static_cast<iunknown*>(pAnalisis);
pMessage->Send(pQueue);
If I get the BSTR value in the producer (before serialization), pAnalisis-getImgName() , it works fine. In contrast, when I try to get it in the consumer, after reading the message from the queue, it doesn't return anything. The other values, such as the size, are returned with no trouble.
The thing is: does anyone know how to send a BSTR value inside a COM object through MSMQ ?
I've tried to find some similar examples but unfortunately totally in vain.
PLEASE HELP!!!
thanks.
|
|
|
|
|
Hi,
There's an example in the book Wrox Proffessional DCOM Application Development. The object sent inherits from IPersistStreamInitImpl<cmyclass>, defines all it's private BSTRs as CComBSTR rather than BSTR.
private:
CComBSTR m_bstrCustomerID;
CComBSTR m_bstrArtist;
...
Then in a property map:
BEGIN_PROPERTY_MAP<cmyclass>
PROP_ENTRY("CustomerID", 1, CLSID_NULL)
PROP_ENTRY("Artist", 2, CLSID_NULL)
....
END_PROPERTY_MAP()</cmyclass>
Then declares put_ and get_ methods for the above:
STDMETHOD(put_CustomerID( BSTR newVal);
STDMETHOD(get_CustomerID( BSTR* pVal);
STDMETHOD(put_Artist( BSTR newVal);
STDMETHOD(get_Artist( BSTR* pVal);
In the IPersistStream method it has:
public:
STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pcbSize)
{
pcbSize->QuadPart = sizeof(DWORD)
pcbSize->QuadPart +=
SizeOfBSTR(m_bstrCustomerID) +
SizeOfBSTR(m_bstrArtist) +
...
return S_OK;
}
Thre's more of course but this seems to be the basics. If this helps let me know if I've missed anything.
|
|
|
|
|
|
Great. Just for your information, if you inherit from IPersistStreamInitImpl and use the ATL property map, which contains, say a BSTR then call:
hr = pIPersistStreamInit->Save (pIStream, FALSE);
This ends up calling:
CComBSTR bstrWrite;
bstrWrite.Attach(*(BSTR*)pData);
hr = bstrWrite.WriteToStream(pStm);
which calls:
ULONG cb;
ULONG cbStrLen = CComBSTR::GetStreamSize(m_str) - sizeof(ULONG);
HRESULT hr = pStream->Write((void*) &cbStrLen, sizeof(cbStrLen), &cb);
if (FAILED(hr))
return hr;
return cbStrLen ? pStream->Write((void*) m_str, cbStrLen, &cb) : S_OK;
so ATL already provides the code which does what your solution suggests.
|
|
|
|
|
Ok mate. I'll be back to this in a few days. Now I'm busy with another project, but I'll try what you say, it looks cleaner and not as tricky as the given solution, though have to check it out.
|
|
|
|
|
I've got MSHTML calling my IAuthenticate interface to get the username/password when it's downloading stuff that needs authentication, but how do I know if it worked?
I have a username/password that will be correct *most* of the time but if it's not, I want to disable calls to my IAuthenticate so that the browser will revert to its normal behaviour i.e. show a dialog asking for authentication details. It'd be nice if I could also instruct the MSHTML instance to retry without using the credentials I supplied.
But to do any of this, I need to know if the username/password I gave worked. Just checking for a HTTP 401/3 might not work since I sometimes seem to get a "This page cannot be displayed" error.
I enjoy occasionally wandering around randomly, and often find that when I do so, I get to where I wanted to be [^].
Awasu 2.4 [^]: A free RSS/Atom feed reader with support for Code Project.
|
|
|
|
|
how to handle flow control without using MSCOMM control?
there is no such flow control property...
|
|
|
|
|
Am I right in thinking you are using VB6.0?
|
|
|
|