|
Did you register the COM server on the remove system?
Kuphryn
|
|
|
|
|
This can only be done via DCOM, are you using DCOM? You have to register control via DCOM...I forget the exact procedure offhand.
|
|
|
|
|
I'm student. I've to make a plug-in for MS Outlook. This plug-in will take a particular date, and will delete all the attchments of the e-mails which are older than that specific date.
Kindly guide me for the task. Provide/guide me some sample code if possible. I'll be very grateful to you.
Waiting for your kind response.
Atif
Watch Your Thoughts for they will become your actions.
Watch Your Actions for they will become your habits.
Watch Your Habits for they will become your beliefs.
Watch Your Beliefs for they will determine your destiny.
|
|
|
|
|
I need to put together an ATL COM object making use of connection points to fire Events for a VB client app.
The problem is the Events will need to be fired asyncrously as when I call a particular method it goes of and creates a worker thread. I need to fire events from the worker thread multipe times back to the VB client, problem is that its now in another apartment as far as the origional thread is concerned, so COM will get upset if I user the interface pointer straight off.
From what I can tell it looks like I need to enlist the help of CoMarshalInterThreadInterfaceInStream . Does anyone have any pointers on a problem like this. Its basiclly real time data to a VB client.
As an aside, I know for Excel you can use DDE (tres old) or RTD for a higher though put in Excel XP, but not interested in this yet.
"Je pense, donc je mange." - Rene Descartes 1689 - Just before his mother put his tea on the table.
Shameless Plug - Distributed Database Transactions in .NET using COM+
|
|
|
|
|
|
Which of the following does not exist:
a) single thread apartment
b) multi thread apartment
c) cross thread apartment
d) thread neutral apartment
|
|
|
|
|
Hi,
I have create an ActiveXControl. It runs, but after one cycle it hangs in the memory.
I know that one solution are the functions AddRef() and Release(), but I don't know how I can use this and where. Please help me.
Julia
|
|
|
|
|
what do you mean " hangs in the memory"? Do you mean after you're done, there's still a floating referance to it somewhere?
You must call Release() on it, basically every time you use a referance to it, you call AddRef, and when you're done, call Release. Technically you're supposed to maintain an "accounting" of all this, but it can lead to insanity. If you're not passing referances to "outside" sources, you should be able to call Release() on it when you're done (the initial AddRef is done automatically).
OR you can use Smart pointers....look up Smart pointers in VC docs, they will do all this automatically.
|
|
|
|
|
Hi
I have created a ATL COM dll.The component will be used in WINDOWS 2000 machines which will not have Visual Studio.What are the ATL com dlls that I have to distribute along with the COM component?Please help.
Rgds,
venkatesh
|
|
|
|
|
I am using script control. when i add a procedure to the script control.if the procedure is error free then it works fine, but if there is a run-time error then a dialog box with the title "Just-In Time Debugging" and containg the option of .Net Studio that do you want to debug it. I want that this dialog box should not be displayed and i can handle this runtime error myself.
|
|
|
|
|
|
Hi
Is integer a COM automation data type?I am using windows 2000.My COM application should work for VC++ as well as VB.
If the interface method has parameters other than VARIANT will the scripting clients like VBA work?
Please help.
Rgds,
Venkatesh
|
|
|
|
|
Hi Venkatesh,
Well you can use "long" data type in your COM servers as it is compatible for both VC++ and scripting clients.
Other type that works fine is BSTR.
sandy
Last night i realized i was seeing a dream in my dream.
|
|
|
|
|
Hi Sandy,
Thank you.
Rgds,
Venkatesh
|
|
|
|
|
hi there..
i am working on a spread sheet control..and need to know if there is any problem with the way i am returning from the Invoke call..
When run this method throws an access violation...any ideas.??
here is the code..
long CControl :: GetObjCellCol(long ObjID)
{
DISPPARAMS DispParam1;
EXCEPINFO excep;
UINT nArgErr;
DISPID dispidNamed;
VARIANT * pResult = NULL;
DispParam1.cArgs = 1; //number of arguments
DispParam1.cNamedArgs = 0; // named arguments.
DispParam1.rgdispidNamedArgs = &dispidNamed;
// Dispatch IDs of named arguments.
DispParam1.rgvarg = new VARIANTARG();
DispParam1.rgvarg->vt = VT_I4;
DispParam1.rgvarg->lVal = ObjID;
IImpl::Invoke(DISPID_F1_CellCol, IID_NULL , 0 , NULL, &DispParam1,pResult , &excep, &nArgErr);
return pResult->lVal;
}
|
|
|
|
|
pResult is NULL. You should be passing the address of a valid VARIANT structure, i.e.:
VARIANT vtResult = { 0 };
IImpl::Invoke(
DISPID_F1_CellCol,
IID_NULL,
0,
NULL,
&DispParam1,
&vtResult,
&excep,
&nArgErr
);
return vtResult.lVal; When the called component comes to fill in the result value, it tries to write through a NULL pointer and causes the access violation.
Hope this helps.
|
|
|
|
|
oooooooooops
thanks )
|
|
|
|
|
I'm relatively new to c++ / com. I'm attempting to use a BHO in an intranet environment to add headers to specific urls. My problem is that using the code below, my new header doesn't turn up at the server (testing with an asp page that dumps all headers + an IP packet sniffer).
USES_CONVERSION;<br />
HRESULT hr ;<br />
<br />
if (pDispParams->cArgs >= 5 && pDispParams->rgvarg[5].vt == VT_BYREF|VT_VARIANT))<br />
{<br />
CComVariant vtURL(*pDispParams->rgvarg[5].pvarVal); <br />
vtURL.ChangeType(VT_BSTR);<br />
<br />
if (strstr(OLE2CA(vtURL.bstrVal), urlSearchList))<br />
{<br />
pDispParams->rgvarg[0].boolVal = VARIANT_TRUE;<br />
<br />
hr = m_spWebBrowser2->Stop();<br />
if (FAILED(hr))<br />
return hr;<br />
<br />
CComBSTR bstrHeaders("NewHeader: Header1\n\r");<br />
CComVariant newUrl(vtURL.bstrVal);<br />
newUrl.ChangeType(VT_BSTR);<br />
<br />
CComVariant vHeaders(bstrHeaders.m_str);<br />
vHeaders.ChangeType(VT_BSTR|VT_BYREF);<br />
<br />
hr = m_spWebBrowser2->Navigate2(&newUrl, NULL, NULL, NULL, &vHeaders);<br />
if (FAILED(hr))<br />
return hr;<br />
}<br />
}
The MSDN docs for the naviagte2 method show the headers arg as being pointer to variant. Am i using the wrong type?
Any links, code, or pointers much appreciated...
::Confused
|
|
|
|
|
You don't need this line:
vHeaders.ChangeType(VT_BSTR|VT_BYREF);
because you're using the CComVariant ctor that makes it a string. (And BTW the type is VT_BSTR not VT_BSTR|VT_BYREF ).
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
Thanks Michael, i should have seen that ... unfortunately using just VT_BSTR (which i began with before i got desperate and just started experimenting) doesn't solve the problem.
Is there a way to determine what field of the struct to load when the documentation just says Variant *??? Or is the data type not really my problem?
|
|
|
|
|
I am implementing a namespace extension and I need to be able to determine what item is selected in the tree view (left hand pane in explorer) which is an IShellFolder implementation.
I can get the selection notification in the listview (right hand pane) in my implementation of IShellView via the IShellView's WndProc callback, but I can find no such mechanism in the IShellFolder.
Is there another interface in addition to IShellFolder that I need to implement in order to get this info or am I just missing something more obvious?
Many thanks!
Mike Hartway
|
|
|
|
|
Hi! everybody:
I'm developing a ActiveX control which is a windowless, If I find something special in my class, I want to SendMessage to this ctrl and let it do something , but I can not get the window handle of this ctrl, so this ctrl also can not get this message.(I have tried AfxGetMainWnd, it doesn't work)
Does anyone has similar experience? Plesae give me some ideas, I'll appreciate
your help.
Ray
|
|
|
|
|
ray_li wrote:
I have tried AfxGetMainWnd, it doesn't work
If your control is windowless there is no window handle so AfxGetMainWnd will not work...
John
|
|
|
|
|
Why use SendMessage??? Won't a regular COM method be sufficient, and easier??
If you you need to use SendMessage, make it a window control and check off the : "invisible at runtime" option
|
|
|
|
|
Is MSMQ merged with COM+?
COM+ = COM + MTS + MSMQ
or
COM+ = COM + MTS
|
|
|
|