|
It seems like you have problems with unicode.
Are the settings OK for that?
|
|
|
|
|
How to extract the content of the _variant_t if
the VARTYPE is VT_DISPATCH?
thank you
|
|
|
|
|
Cast it to LPDISPATCH .
rechi
|
|
|
|
|
ppdispVal
[ It is possible to represent everything in this universe by using 0 and 1 ]
|
|
|
|
|
I have project that is based MFC, in this project, i want to catch new event of Word in AutoMation, and now i can catch sample enent, such as "DocumentChange", "Quit", but i can't catch "DocumentOpen" "DocumentSelectChange" etc new event, why? please tell me
how to do, thanks a lot!
Hello everyone
|
|
|
|
|
http://www.codeproject.com/com/adWordAddin.asp
|
|
|
|
|
Hi all,
Can I build ActiveX Control that implements the multithread features? What I means is the control that operate the background process and user can stop its operation.
Why do I need this control? It seems like a console UI control that I can key any commands on this control and then it sends the command to a hardware via serial comm port. After that the hardware send back data to buffer. The control reads back and display on the console. I found some difficulties on this model. If the hardware sends a long operation data, UI control is freezed, I can't key any commands to break it.
Thank you very much
champ
|
|
|
|
|
Please read this article [^] before applying any threading work inside ActiveX control.
|
|
|
|
|
Is there a simple way to determine the location of a COM server for a given CLSID?
I know that given a CLSID, I can convert to a string and look it up in the registry "HKEY_CLASSES_ROOT\CLSID\<clsid>" - I can then look at the key (for example) "InprocServer32" and find the server name/location.
Incidentally, there is some code to do this and more here[^]. This is great but I just thought there may be some macro or API call I'm missing which can do it without me having to explicitly look it up in the registry.
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
you can use the OLE/COM object viewer of VC++. There you can find all the COM objects you have registered (and typelibs).
|
|
|
|
|
Thanks, but I needed to find my server from within my COM client's code.
I still think there must be a way of doing it but my workaround was to implement a method for my coclass(es) which returns the containing server's name/location (in-proc DLL).
My specific requirement was for my client to be able to load a resource (icon) from the server. Once I have the server's name/location, it's then easy to call (for example) ExtractIcon(Ex)() . I still don't think this is the most elegant solution but hey it seems to work
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
Hello,
Application
-----------
I've created a multi-tier application. Its architecture is:
On client machine --> the client application is an ActiveX EXE component (VBasic).
On server machine --> some COM+ server applications and a SQLServer database.
Use Case
--------
CLIENT1
--> asks SQLServer database for an object (= a row in objects table).
The state of this object is stored in a storage file.
--> if the object can be check out, it means nobody else have checked out the object,
the server will set the objects.checkedoutby = ClientID and will copy the stg file
in a shared folder on server machine.
CLIENT2
--> tries to check out the same object
--> the server must know (??? - MY QUESTION IS ABOUT THIS POINT) if the CLIENT1 application
is still running or a crash has occured and CLIENT1 was not able to check in the object.
Remarks
-------
1) CLIENT2 will receive a copy of the storage file if CLIENT1 is still running
2) CLIENT2 will have the possibility to restore the storage file from
an older version if a crash occured in the CLIENT1 application.
3) Many clients can log in using the same account (user name and password)
4) There can be more than one instances of the application on the same client machine
My solution
-----------
My solution is to create an instance of an "watchdog" ActiveX EXE on the client machine
when the client application is started. This "watchdog", from time to time (5 minutes by example),
will modify the value of a date field named NotificationDate in database.
When the client application shuts down, the "watchdog" will stop updating that field.
The stored procedure responsible for check out will use the value of NotificationDate field
to decide whether the CLIENT1 application that use this object is still running or a crash has occured.
Questions
---------
1) Is there a pattern for this problem?
2) What about my solution?
10x,
Ovidiu
|
|
|
|
|
Hi,
I'm rather new to COM. I was working with the ATL/COM wizard in VC++ and I tried to overload an interface method. But the wizard doesn't let me do this. It says that the name conflicts with an existing name. Is there any way I can actually overload an interface method in VC++?
Thanks in advance
|
|
|
|
|
you MUST implement an interface in the class where it is used as the base interface..if u dont implement an interface it will not compile and ask for the implementation of the interface in the inherited class..
so here are the steps...
1. make a new class..
2. make it inherit from the Interface u just made..
3. Implement all the methods that the interface has got, in the class..if u dont want to implement a method, make it return E_NOTIMPL!
|
|
|
|
|
I'm not sure if this is the right forum but please tell me and I hope you understand my english....
My problem is that when using a deskband I wnat to know if the band is beeing destroyed because is changed form docked to floating and so on or because the user has closed it....Does anyone understand me and maybe know the solution...
///Mårten
|
|
|
|
|
|
Can anyone suggest a way I can return my COM object's module instance handle (HINSTANCE) to my client?
Am I going to have to use a VARIANT?
The reason I wish to do this is to get a handle on my COM object so I can access its resources like strings and icons.
The alternative is for my client to just access my COM object's container DLL but then my client would have to determine the DLL name by calling a suitable method. This sounds a bit of a "hack" to me though, compared with accessing the resource via a returned module instance handle.
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
Just exporting it by a long property will be enough. You don't need to use VARIANT .
rechi
|
|
|
|
|
Hi all,
Can anyone tell me how I an find out what a specific HRESULT error code means? The specifics are that I'm trying to set the text of a Bookmark in Word (using C#), but I keep geting a COMException which only tells me that the attempt to set Bookmark.Text failed, and supplies an errorCode. I'd like a bit more info - i.e. why it failed
are the Office Automation errorcodes documented anywhere? I can't seem to find anything on MSDN.
TIA,
Pete
|
|
|
|
|
hello!
is there any way to get remote client's icon (from its executable file for example) by my server (com application)?
thanks in advance.
max da man
|
|
|
|
|
Maybe you can make the client to return to the server a picture object ( see IPicture OLE implementation in MSDN).
|
|
|
|
|
using typelib read name of executable/dll and try LoadResource (icon)?
Just a guess..
|
|
|
|
|
What is COM and what do I use it for ?
I am programming in Visual C++ 6.0 - do I need to know what COM is ? eek:
can someone explain it to me like if I am a 3 years old child ?
thanks alot
Sendel
|
|
|
|
|
|
thanks
Sendel
there is no spoon
|
|
|
|