 |
|
 |
Your tutorials are good.
But I am having problem in visual studio 2010.
Things are different in VS2010, so having difficulty from Step 3 in your tutorial.
So, if possible please update your tutorial such that it can followed in VS2010.
|
|
|
|
 |
|
 |
Hi!!
Is there anyone who could explain me what datatypes it is possbile to pass through a COM interface and when do I need to serialize a data structure by my own??
In all the docs I read, I wasn't able to find precise indications about datatypes and structs I can pass trough the COM interface.
Thank you very much and I hope these basic questions are not to boring.
Thanks again!
marc
|
|
|
|
 |
|
 |
Sponky77 wrote: Is there anyone who could explain me what datatypes it is possbile to pass through a COM interface and when do I need to serialize a data structure by my own??
In all the docs I read, I wasn't able to find precise indications about datatypes and structs I can pass trough the COM interface.
It's not immediately obvious how to do this. One might byte-stuff the thing into a BSTR and specify the length of the struct and then unpack it on the other side, but for anything more sophisticated you'd have to implement custom marshaling and that's beyond my expertise.
Sincerely Yours,
Brian Hart
Department of Physics and Astronomy
University of California, Irvine
|
|
|
|
 |
|
 |
Great tutorial first of all!!!!!!! Thanks!!
Hi everybody,
I'm trying to use a remote dcom object but I have always problems accessing the object. I use the dcomcnfg tool to setup the object and the question is:
do I have to setup both server objects (local and remote) or only the remote ne?
Could it be that I work on two different versions of WinXP (Prof and Home)??
Any other Idea???
THanks!!!!!!!! And have a nice day!!!!
Marc
|
|
|
|
 |
|
 |
Sponky77 wrote: I'm trying to use a remote dcom object but I have always problems accessing the object. I use the dcomcnfg tool to setup the object and the question is:
do I have to setup both server objects (local and remote) or only the remote ne?
You have to set up both the local and remote server objects.
Sponky77 wrote: Could it be that I work on two different versions of WinXP (Prof and Home)??
I recommend you to work on Windows XP Pro for both sides.
Sincerely Yours,
Brian Hart
Department of Physics and Astronomy
University of California, Irvine
|
|
|
|
 |
|
 |
i want to show in datagrid name of course & other detalis &in the same time when check in course & choose the link edit and edit data in the datagrid that update in DB,how
|
|
|
|
 |
|
 |
Hi ,
first of all thanks for your teto.
-My question is how can I use my DCOM server to use interfaces of a simple win32 dll?
-also how can my DCOM client be a dll that deliver interfaces which could be used with an executable?
THank you and best regards
aizzou
|
|
|
|
 |
|
 |
Just wondering what the next information message in EventViewer stands for:
"The description for Event ID ( 0 ) in Source ( HelloServ ) cannot be found. ..."
It appears every time the server is just launched.
Seems like smth left undone in this tutorial, although it helped greatly.
|
|
|
|
 |
|
 |
Dear Mr. Brian Hart,
i have tried to build many times and configure the project setting as you guided but it couldn't generate HelloServps.dll file!
Please help me to solve my problem as soon as possible, it's very important to me.
Thank you very much
|
|
|
|
 |
|
 |
Can some one help... I'm trying to acces a remote COM from local machine. I've a in-proc COM server (DLL), and want to acces it remotely. I was getting an error, when I tried with CoCreateInstanceEx(), i.e. "Class Not Registerd" from remote machine. so, I've exported (Registerd) it using 'Component Manager Snapp-in'. Right now I'm able to get the class access(because Class constructor gets called on remote machine), but it fails to get Interface pointer from class. And Interfaces implemented by class is also not shown in the snapp-in under 'Interfaces' Tag. Am I laggin somewhere? Is there any other way to do so? Please reply for the same.
Thanks for anykind of help...... !!
|
|
|
|
 |
|
 |
Following steps Works fine as i had checked it with HRESULT return value:
1) CoCreateInstanceEx.............OK
2) QueryInterface.............OK
3) Now, i get a requested interface ptr & i call a method But my Client code get STUCK there for long time.
|
|
|
|
 |
|
 |
My dialog never opens.... any ideas ? I can put a messagebox() and see it up to the end of the constructor... but if I put it in the very beginning of the Init() it doesn't show up. What will cause the app to shutdown before getting to that point. No error occurs. Thanks.
|
|
|
|
 |
|
 |
Hi,
I have written the following code and I am able to instantiate the
Object (Excel.Application) on a remote machine however when I try to create
the instance of my own Object (the ActiveX - DLL which I created using
VB), the program throws an error saying
"ActiveX component cannot create Object"
Can some one please help me.
Public Function CreateObjectEx(ByVal Class As String, Optional ByVal
Server As String = "", Optional Binding As BindingType = LATE_BINDING)
As Object
Dim rclsid As GUID
Dim riid As GUID
Dim hr As Long
Dim ServerInfo As COSERVERINFO
Dim mqi As MULTI_QI
Dim Context As Long
' Convert IID string to binary IID
If Binding = EARLY_BINDING Then
hr = CLSIDFromString(StrPtr(IID_IUnknown), riid)
Else
hr = CLSIDFromString(StrPtr(IID_IDispatch), riid)
End If
If hr <> 0 Then Err.Raise hr
'Setup the MULTI_QI structure.
mqi.pIID = VarPtr(riid)
'Convert provided CLSID or ProgID string into a binary CLSID
If ((Left(Class, 1) = "{") And (Right(Class, 1) = "}") And
(Len(Class) = 38)) Then
hr = CLSIDFromString(StrPtr(Class), rclsid)
Else
hr = CLSIDFromProgID(StrPtr(Class), rclsid)
End If
If hr <> 0 Then Err.Raise hr
'Decide on the appropriate context value.
If Server = "" Then
Context = CLSCTX_SERVER
Else
Context = CLSCTX_REMOTE_SERVER
End If
'Setup the COSERVERINFO structure.
ServerInfo.pwszName = StrPtr(Server)
' Create an instance of the object
hr = CoCreateInstanceEx(rclsid, CLng(0), Context, ServerInfo,
CLng(1), mqi)
If hr <> 0 Then Err.Raise hr
Set CreateObjectEx = mqi.pItf
End Function
|
|
|
|
 |
|
 |
Thanks for reading my DCOM tutorial. I am pleased you find it useful. I can be of service to your enterprise, even half-way around the world, if you need a custom DCOM solution implemented.
Several people have posted very good questions on this message board about the DCOM tutorial, and I try to answer them as quickly as I can. Thank you all for being so interested in my explanation of DCOM.
If you're stuck trying to implement a custom solution, please do not post a question about it on this forum, but instead only reserve these boards specifically for questions on this Tutorial.
If you have another DCOM question, please contact me to explore any business opportunities. I operate by Instant Messenger and PayPal and have no qualms about staying up late at night to conference with you anywhere in the world. So please inquire by replying to this message, and I will be happy to provide you my resume and list of publications.
Sincerely Yours,
Brian Hart
Department of Physics and Astronomy
University of California, Irvine
|
|
|
|
 |
|
 |
hi,
when i run the server on another m/c it gives the above message.thanx in advance..
|
|
|
|
 |
|
|
 |
|
 |
hi all,
I am looking for a commercial tool that can convert
a DCOM interface into a tcp/ip interface.
Does anyone know such a tool?
thank's,
Zahi
|
|
|
|
 |
|
 |
Please help me to understand COM. (And please excuse my english) I played around and noticed some things. First thing that needs explanation: It seems the constructor of CHelloWorld is never called. <ULTRA-BIG> ? Second: I start multiple Clients. Every Client advises to the Server, so at all Clients the "Call Method"-button is highlighted. Now, if I press a "Call Method"-button on a Client, this one is the only one which receives the event fired by the Server. My lagging undertanding of Fire_XXX is, that every COM-Object which is advised to a Connection-Point receives the event.... <NEXT-BIG> ? Can anyone clear things for me a bit please ? MfG Sebastian
|
|
|
|
 |
|
 |
hi,
I am getting this Error : Unable to access IHelloWorld because Class not Register. Wht could be the problem i am not able to find out ur solution will be Valubale for me to correct my self.
Thanks and Regards
Sai
|
|
|
|
 |
|
 |
This is most irritating and suckin message I have ever encountered, after struggling hard for two weeks...What i did....I created new project and with different name and iddferent interface name..then that rascal worked.
if you ever get GOOD and genuine answer plz do let me know.
CREATE NEW PROJECT WITH NEW NAME AND NEW INTERFACE NAME, this is only the solution..
other answer you will find are
1) Unregister using regsvr32 /u xyz.dll
and then Regsvr32 xyz.dll
2) or after compiling goto tools and register from there....
but thsese answers are NONSENSE...
regards
Balkrishna Talele
|
|
|
|
 |
|
 |
I ran into this and found my post build steps have vanished for some unknown reason... If you don't rebuild the HelloServps.dll after adding the method, you can register the dll a million times without having the proper interface. Note that it's possible that no error message comes up on build, if you should mistype one line.
|
|
|
|
 |
|
 |
Hello!
I would like to run with COM+ an application on another PC. But if after some time the PC is disconnected to the network it is difficult to uninitialize the component. So i ping the controller on the network and if it is disconnected i will run a "modified" uninitialization.
But problem is, when i call "interface".Release() it takes up to 50 seconds if COM+ Runtime realizes that the rpc-server is unavailable and returns from Release-function.
What can i do???
Are SmartPointers a problem???
Thanks for all help.
Greetings harkan
|
|
|
|
 |
|
 |
harkan wrote:
I would like to run with COM+
Are you referring to DCOM? COM+ and DCOM are two very different techs.
harkan wrote:
when i call "interface".Release() it takes up to 50 seconds
Try simply having your program get rid of the interface pointer without trying to call release. That is, don't call release upon detecting that the connection was broken, but just show an error. Dispose of the smart pointer through delete or just let it go out of scope. If you are using smart pointers, the smart pointer will cleanup for you.
DCOM is kind of brain-dead this way.
Sincerely Yours,
Brian Hart
Department of Physics and Astronomy
University of California, Irvine
|
|
|
|
 |
|
 |
Hello Everyone.,
For broadcasting purpose (Pushing a Stream to a Windows Media Server) , I necessarily have to connect to the Media Server and create an object in there prior to start my broadcasting using DCOM . I tried with the following code ..
-----------------------------------------------------------------
CString m_strServerName = "ServerName" ;
CString m_strPublishPoint1 = "publishpointName" ; //Used for Broadcasting
ZeroMemory(&cs, sizeof(cs));
cs.pwszName = m_strServerName.AllocSysString();
cs.pAuthInfo = NULL;
// Create a MULTI_QI structure to hold an IUnknown pointer
// to an IWMSServer interface.
ZeroMemory(&mqi, sizeof(mqi));
mqi.pIID = &IID_IWMSServer;
mqi.pItf = NULL;
mqi.hr = 0;
// Retrieve a pointer to the IWMSServer interface.
hr = CoCreateInstanceEx(CLSID_WMSServer,NULL,CLSCTX_LOCAL_SERVER |CLSCTX_REMOTE_SERVER,&cs,1,&mqi);
if (FAILED(hr))
{
return hr;
}
// The MULTI_QI structure contains an IUnknown pointer. Call
// QueryInterface to retrieve a pointer to IWMSServer.
hr = mqi.pItf->QueryInterface(IID_IWMSServer,(void**) &pRemoteServer);
---------------------------------------------------
I get "RPC server unavailable" .
Server is Windows 2003 and remote one.If I connect to a server locally or to an independent IP in the same network , it successfully connect . But, if the server is remote and in different network I get "RPC server is unavailable" . Could someone send some hints or solutions ..which is greatly needed.
Thanks in Advance..!
Best Regards,
Nick.
|
|
|
|
 |
|
 |
newnick wrote:
Server is Windows 2003 and remote one.
Make sure you put the fully-qualified UNC pathname to the server machine, including the remote netowrk if possible, into the m_strServerName variable. Make sure to escape the backslashes.
If that doesn't work, try specifying the remote server's IP address, .e.
m_strServerName = "128.200.192.1";
serverInfo.pwszName = m_strServerName.AllocSysString();
Sincerely Yours,
Brian Hart
Department of Physics and Astronomy
University of California, Irvine
|
|
|
|
 |