|
Thanks a lot for your replies.
|
|
|
|
|
I have a server and a client running on diffrent machines.
I want the client to activate methods on the server's machine.
is comm the answer for that?
if it is, how do i do it?
Yoav Zur
mailto: yoav_zur@mediguide.co.il
|
|
|
|
|
Hi,
Yes, COM is the answer. You can use Distributed COM (DCOM), or if you are using Windows2000 you can implement COM+ for this purpose. How you do it needs a lot of training on DCOM or COM+, I recommend the second one, which is COM+, if you have Windows2000 OS. To do this, take one of the good books like "Mastering DCOM", or "The COM and COM+ Programming Primer" and start from there.
Regards,
ShadiK.
Shadi Al-Kahwaji
|
|
|
|
|
I am trying to register a Shell Extension I write via:
regsrv32.exe myshell.dll
But I'm getting an error: 0x80070716
I can't find this anywhere and attempts to break it apart don't reveal anything. I'm using sample code from a project on this site and the sample project runs fine. At this point all I've changes is the GUIDs and the name of the Class. I've double and triple checked that my GUIDs are correct and nothing else is wrong. But, I keep getting this error code.
Can someone help me in figuring out what the problem is?
Thanks, RZ
|
|
|
|
|
The VC error lookup util says "The specified resource name cannot be found in the image file."
--Mike--
http://home.inreach.com/mdunn/
#include "witty_sig.h"
your with and
|
|
|
|
|
Well, that clears it right up!
I did stumble on this while looking at winerror.h, but figure it didn't apply. What image file? There is only one bitmap resource, and it looks fine. What other images could they be talking about? OR does "image" not really refer to a graphical image? Either way, I'm still lost and frustrated.
RZ
|
|
|
|
|
I was hoping that error would be meaningful to you. You can debug the registration process by going to your project settings, Debug tab, and set regsvr32.exe as the "executable for debug session." Then set a breakpoint at DllRegisterServer() and start single-stepping.
--Mike--
http://home.inreach.com/mdunn/
#include "witty_sig.h"
your with and
|
|
|
|
|
I deleted the project and started over, and now it works. I have no idea what I was doing wrong, but it must have been something subtle.
Thanks for your help (and your articles!!!)
RZ
|
|
|
|
|
VC++6 , W2k(sp2)
I created an MFC( Dynamic link ) DLL ,and I have put an ActiveX control on it.
When I Load the DLL and call the ActiveX's method i.e
"Play", then I am not able to access the window at all
( i.e cannot press any button ), because the window freezes.
Can someone please give me the solution
Thanks
Sanjay
|
|
|
|
|
Which classes of MFC are you using?
|
|
|
|
|
Hai Everyone!I have added a CommandBarButton and MenuBar in the Word2000 and Excel2000,using ATL and COM as well.My problem is I want to add a bitmap or icon to both the CommandBarButton and MenuItems .I want to do it using ATL and COM.Can anyone please suggest how can I do it.My emailid is ramachandrulasreeram@rediffmail.com.Please do reply me back as I need it urgently.
Regards
SreeRam
|
|
|
|
|
::OpenClipboard
::LoadImage
::SetClipboardData
::DeleteObject
::CloseClipboard
Office::_CommandBarButtonPtr::PasteFace
::EmptyClipboard
These are the methods in the order that you will need to call to get a custom bitmap onto a command bar button.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
Hi Erik!
Thankz for u r timely help.
Regards
Sree Ram
|
|
|
|
|
Hi All,
I'm interested in your thoughts about the following:
I have created an ATL COM object with an interface that
consists of the methods Run and Stop. From a
client application I would like to be able to call the Run
method which causes my COM object to start a long
operation. However, the Run method should return immediately
because i don't want any multithreading code in my client.
The long operation can be stopped by calling the Stop method.
Currently, I create a worker thread in my objects Run method
and set a stop flag when the Stop method is called. The worker
thread periodically checks this flag and exits if it is set. For
this to work, my object is created in the MTA.
However, I have the feeling this can be done much simpler. (Also,
there are warnings everywhere about creating threads in COM objects)
I have looked into Asynchronous method calls but this limits my application
to Win2000 and does not work with IDispatch derived interfaces.
Any other idea's, pointers, samples ?
Thank you,
Alwin!
Alwin Beukers
|
|
|
|
|
I use that exact method, and it seems to work fine for me. The worker thread in the Run() method I mean.
If there is a classier way of doing it, I'd like to know.
J
|
|
|
|
|
I have an out of proc server, and a buggy beta-ish client. There is always only a single instance of both client and server. Quite frequently, the client crashes before releasing its server reference.
The one solution I've come up with for this problem, is to have the server keep track of when the client connects and disconnects (implement my own IConnectionPoints) so that if I get an Advise() call before the required Unadvise() call, I (the server) will decrement my own reference count.
Is this as evil as it sounds? I get the feeling this is a kludge solution, and I'm hoping y'all can help me out.
J
|
|
|
|
|
Hi,
Can you give some snapshots of the code?
The out-of-process server - is it a DLL or an EXE?
With best regards,
Sayan Mukherjee
|
|
|
|
|
Ok, actually, it's not a problem that the client crashes. The client code is just one of our applications. The problem is that WHEN it crashes, it never gets around to Release()ing the interface on the OOP server object. It can't, because it crashes.
My question is more about style. Is it OK for the OOP server object to Release() itself if I know that the client will never get around to it?
J
|
|
|
|
|
hello all,
How do I dynamically add script elements through HTML DOM interfaces? I know I can add body element,options etc through DOM but what about scripts?
I'd like to add a simple script at runtime?
TIA.
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
Hi All!
I have been using Smart Pointers to access an active access control's functionality. But I have no idea how to get its events.
Let me tell you one thing that I was using Class Wizard before and i was getting events properly, but there is some problem in the control and I cannot instantiate right at start of application. SO to have good control I am instantiating that control using Smart pointers but I have no way to get its events.
Any help would be appriciated.
Thanks.
Sohail.
"liahoS@hotmail.com"
|
|
|
|
|
Hey,
I've got a tough problem I can't seem to nail down at all. I'm dealing with a series of COM components. One of the components loads another. The outer component loads fine and in turn loads several other components. One of the components it loads is a progress bar dialog written in ATL (everything is ATL). The main COM DLL uses a smart pointer and CreateInstance(__uuidof(blahblahblah)) to instantiate it. When this happens the DLL freezes hard. After a little looking I discovered that the smart pointer was NULL which would certainly explain the freeze. I guess I'm wondering if anyone could shed some light on why my smart pointer is dumb? (heh)
I use: #import "component.tlb" no_namespace
and instantiate the normal way... nothing new. It's the same as all the other components which work fine. The component itself works fine in a dummy application I wrote to verify it. The TLB is solid and I've rebuilt it several times to make sure.
I'm getting pretty agitated. Any gotcha's anyone know of?
Thanks
|
|
|
|
|
Smart pointer is actually a object wraper around interface pointer
whend u declare smartpointer as
IMyClassPtr Mysmartobj; it declare a wraper class around interface ptr.
HRESULT hr
hr = Mysmartobj.CreateInstance(__uuidof(Myclass))
when u check the value of smart pointer just befor this call it is just NULL ,nothing wrong in it but it must contains some valid value after this call.
if it is empty after this call check for Hresult retruned. it may give u some indication of this call failure.
|
|
|
|
|
The basic rule of COM says, In COM, once you "publish" an interface contract by shipping a component, the contract is immutable—it cannot be changed in any way. You can not add. You can not delete. You can not modify.
But, when you open Microsoft Word 97/98 and Microsoft Word 2000 's .OLB files, you will see that for extending the interfaces, they have added methods to the old interfaces. For example, in MS Word 2000 they have added methods in Application interface, and all the other interfaces. Why So? I feel the right approach is to add new interface if you want to extend an interface. Can somebody tell me its' reason??
|
|
|
|
|
Hi,
There are two ways to access a COM interface, accessing using virtual table (IUknown interface), and accessing using Dispinterface (IDispatch interface). If you are using the first approach, the fact that the interface is imutable is true, and you will have trouble in accessing changed interfaces. But if you are using the other approach, you are safe, becuase always you are accessing the same interface (IDispatch) which direct your call to the required interface.
MS Office tools are using Automation (IDispatch interface), so they don't have problems in changing interfaces' methods.
Regards,
ShadiK.
Shadi Al-Kahwaji
|
|
|
|
|
Hi,
Thanks a lot for your information.
In the application which I am writing, I support both dual and dispatch interface. Now, I want to publish a new version of my COM Server. How should I extend my existing interfaces?
Thanks and Regards.
|
|
|
|