|
Hi Guys,
Good Morning/Evening,
i want to know few basic stuff related com+
1)if a Machine is having COM registerd...how a remote machine can access them who knows only Component name and functions.
2)who is taking care of global memory allocation and deallocation.
3)what is the use tlb file.
Thanksvikas da
|
|
|
|
|
This[^] would be a good place to start. Also you could take a look at some of the articles on COM here on CodeProject. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Hi all. Show me, please, how to handle this event, to the link opened in same window.
In msdn says that must be replaced by a pointer to IDispatch, but it does not work.
VARIANT * v = &pDispParams->rgvarg[1];
if (v->vt == (VT_BYREF | VT_VARIANT)) v = v->pvarVal;
IDispatch* *pdisp = 0;
if ((v->vt & VT_TYPEMASK) == VT_DISPATCH){
pdisp = (v->vt & VT_BYREF) ? v->ppdispVal : & (v->pdispVal);
if (pdisp[0] != NULL){
pdisp[0]->Release();
}
g_pSite->get_Application(pdisp);
}
Values that come - commented out. What am I doing wrong? Why not this work? How can I solve this problem?
In handler DISPID_NEWWINDOW3 event comes value URL of the new windows, but don't comes other values needed for navigate2, therefore, this solution does not suit me.
Sorry for my english. ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
It's me. I asked the question correctly?
|
|
|
|
|
Hello!Please suggest me COM objects to make a screenshots!I want to use it in my .Net application!
|
|
|
|
|
You can capture the screen using the API call CreateDC(_T("DISPLAY"), 0, 0, 0);
You can create a COM component yourself and put this call in it.
Here is some code that captures the screen for .Net applications - Capture a Screen Shot[^]
|
|
|
|
|
Ok!I'll try it!But here anothere question bubbles up : is it a way to use my COM object in my Silverlight application(will it rise Security exceptions)?
p.s. Thx for quick answer on my previous question ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Hello all,
I have made an ocx . It includes the Winsock and the Timer controls . But the problem is that when I try to use the ocx in the application on some other computer the application gives error about the using the correct version of the OCX. Now when I place the ".ctl" file along with the ocx , it works fine . Now It is really annoying as i have to install complete visual basic setup on the client PC so that ".ctl" file works with ocx as app does not run only on vb runtime. Please suggest the solution.
|
|
|
|
|
I remember when using VB6 it had a thing about increasing the version number at the slightest opportunity. Maybe this is the same problem? I seem to remember an option in the object to stick with a particular version, pointing the settings at a Version Compatible Component to make this happen comes to mind.
|
|
|
|
|
Hi Guys,
I have been asked a question during a presentation like how can we access a COM comonent from some other box that is not having registry info for the COM.
please help me here
Thanksvikas da
|
|
|
|
|
you should have a look at the RPC invocation methods.
|
|
|
|
|
You can also use the option of RemoteServer present in the Project properties tab . Vb makes the vbr file which can be accesible by the remote machine . the option is useful if you have made the ocx or active x exe projects
|
|
|
|
|
Hi quantimizer,
Thanks for replying me...
actually question was like there is COM+ component lets say "Maths",it been registered with machine A
there is machine B over Network it does not know anything abt machine B except component name and methods
so how can machine B use the component of Machine A.
i guess can it be done Via URI and RPC...i am just not sure...
Thanksvikas da
|
|
|
|
|
Hi Guys,
Good Morning/Evening,
i have to give a presentation for 45 mins about COM+.
can somebody suggest me what and all i should include here to make the presentation better...
Thanks
Vikasvikas da
|
|
|
|
|
Take a look at the COM articles here on CodeProject for ideas. Frankly if you need to ask this question you may like to reconsider this task. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Hi all
we have com objects which needs to be shared between two worker threads.to provide effective
synronization b/w worker threads we have choosen Single Threaded Apartment(STA).i am able to register
and retrieve the interface from GlobalInterfacetable successfully with the help of
registerInterfceinGlobal and GetInterfcefromGlobal api's.but the problem comes up when i invoke any
method with the interface retrieved from Globalinterfcetable.the HRESULT status is 0x80010105: The server threw an exception.
can any one tell how to sove this issue
Thanks in Advancesukumar
|
|
|
|
|
Hard to say without seeing your code. Are you doing something like this:
g_pGIT = 0;
ATLTRACE("Messemger: Calling CoCreateInstance on CLSID_StdGlobalInterfaceTable\n");
hr = ::CoCreateInstance(CLSID_StdGlobalInterfaceTable,NULL,CLSCTX_INPROC_SERVER,IID_IGlobalInterfaceTable, reinterpret_cast<void **>(&g_pGIT));
if(FAILED(hr))
{
nErrID = IDS_CREATE_GIT_FAILED;
__leave;
}
hr = g_pGIT->RegisterInterfaceInGlobal(m_pIWebLog,IID_IWebLog, &g_dwCookie);
if(FAILED(hr))
{
nErrID = IDS_REG_OBJ_IN_GIT;
__leave;
}
|
|
|
|
|
You can consider CoMarshalInterThreadInterfaceInStream() and CoGetInterfaceAndReleaseStream() functions as well.
|
|
|
|
|
Make sure that
- all threads that create COM servers are pumping messages, i.e. they are UI threads
- every thread that do any kind of COM stuff initializes the COM library with a call to
::CoInitialize() or one of its equivalents - your proxy-stub is properly registered, or your typelib is properly registered if your doing typelib marshalling
Using the GIT for marshalling works very well.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hello,
I have to compile COM components written in VC 6.0 or edited and
modified in Visual Studio 2003 in Visual Studio 2010. It is giving
error messages like
' error C1189: #error : This file requires _WIN32_WINNT to be
#defined at least to 0x0403. Value 0x0501 or higher is recommended'
IntelliSense: #error directive: This file requires _WIN32_WINNT to be
#defined at least to 0x0403. Value 0x0501 or higher is recommended'
It given the error in the conversion report that atl support is
eliminated.Can any body tell a way around to compile and build COM
components that were originally written in VC 6.0 or Visual Studio
2003.NET
Regards
Muhammad Usman Khalilmodified on Tuesday, February 16, 2010 7:32 AM
|
|
|
|
|
The compiler is telling you what is necessary, so you need to do what it says. Using newer compilers/libraries than were available in VC 6.0 means you have to change up to the new rules, and fix anything that works in a different way. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Hi All,
I am using one com dll and have multiple clients on the same machine which are creating pointers for same interface, so is there can be any conflict.
Example:
SomeComComponentLib::IsomeInterface objInterfaceptr;
.....create instance
Now all the client applications are using objInterfaceptr in same way...Please provide me some suggestion to avoid conflict.Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
I guess there won't be any conflicts as COM components are not confined to a single process.
|
|
|
|
|
I'm trying to implement a COM obj. IUnknown, IDispatch based with automation.
I’ have implemented standard COM in plain C (it is registered - with name, CLSID, InProcServerPath...).
The client for this obj. in C uses CoCreateInstance and it works fine.
CoCreateInstance refers directly to Interface thru obj. CLSID and interface IID.
I'd like to expand this implementation and provide an Automation for this object.
At the current moment when I'm trying to implement a client in script language - the client requests for IID_IUnknown, IID_IDispatch (inside ClasFactory), but not for IID of my Interface.
When I implemented IDispatch methods - GetTypeInfoCount returns E_INVALIDARG.
The Question is how to Implement an automation in plain C, with no IDL, TypeLib etc...
Any Suggestions might be useful.noel
|
|
|
|
|