|
|
I dont know in which context this question is?
Assuming asked in MFC context.
When systems starts any of mentioned operations it first send WM_QUERYENDSESSION message to application.
override it to trap above operations.
|
|
|
|
|
Thank you, Prasad_som.
When System starts to reboot, it send WM_QUERYENDSESSION message to applications ONE BY ONE. So I cannot detect the system status immediately.
|
|
|
|
|
|
|
I need Self teaching book about COM OLE Automation ActiveX and ...
please give me a good book name.
|
|
|
|
|
"Jeff Prosise - Programming Windows with MFC" from Microsoft Press has a chapter dedicated to COM OLE and ActiveX. It does't cover every aspect of the domain but it's a good start.
|
|
|
|
|
Hi,
I had been trying to find methods to pass array from a COM DLL and had come across 2 ways of doing it.
method(SafeArray(Type) **pVal);
method(Variant *pVal);
What is the different between passing the array out as a SafeArray and as a Variant?
What is the advantage of using either of them?
Are both methods supported by all technologies like .Net, Java, etc...?
|
|
|
|
|
w_logan wrote:
Are both methods supported by all technologies like .Net, Java, etc...?
SafeArray(Type) is not supported by VB if my memory serves me right. It requires to stuff the array inside a variant.
|
|
|
|
|
Thanks for replying. I also happened to read about this in your interest exchange below after I had posted the thread.
This had cleared my doubts on why people are passing it as a Variant .
|
|
|
|
|
I have installed an COM object on an client machine. Then I am using an CAB file containing an OCX (with references to the COM Object) on the web to use the installed COM object.
When the Web page is loading I get this message
IE has blocked this site from using an ActiveX in an unsafe manner. As a result, this page may not display correctly
I have signed the CAB and OCX file, and the OCX is marked as safe and for initializing.
I am using Javascript to access the ocx from the web
Spaz
|
|
|
|
|
Is it marked as safe for scripting?
|
|
|
|
|
Yes
Provide the following registry keys for the control's CLSID under the Implemented Categories section:• The following key marks the control safe for scripting:
{7DD95801-9882-11CF-9FA9-00AA006C42C4}
• The following key marks the control safe for initialization from persistent data:
{7DD95802-9882-11CF-9FA9-00AA006C42C4}
In my .INF file from the CAB the above values exist...
Spas
|
|
|
|
|
|
Hi,
I need some help to find out how to access a com+ object remotly from client using vb.net. I exported the server component as an application proxy.In the client machine I tried to install the component as a proxy. But actual server component (dll and tlb )also goes to the client machine . Still I could not create an object using createObject (vb.net). My com+ component is vb.net .
Is there alternative way to access com+ object remotely other than exporting and insatalling as an application proxy ?
If this is the way,how can I prevent actual servercode (dll) goes to client?
Is a standard way to write com+ component to be access remotely?
Please help me
|
|
|
|
|
I am using System.Management.Managementobjectsearcher in C# to read processor Number. Internally it uses COM objects.
So it gives error that System.Runtime.Interopservices.COMException and error message is Com object is not registerd.
This error comes only in windows98. It works well with 2000,xp,2003 etc...
So tell me how to solve this error..
Nilesh Gambhava,
Life is NP-Complete so don't use Algorithm but use Heuristics
|
|
|
|
|
How can I place an activex property in a specified category other than misc.
|
|
|
|
|
Hi
I am trying to develop a class library that utilizes COM+ services using the ServiceConfig class in EnterpriseServices namespace and executes a piece of code in a transaction. The method does distributed database access. One of the database is sqlserver and I am able to acess the data fine. However, when trying to acess data on the DB2 running on a OS/390 platform, I get this exception "Attempt to establish connection failed with security reason "17" ("UNSUPPORTED FUNCTION"). SQLSTATE=08001". I have DB2 Connect version 8.2 installed and also created a datasource for accessing data.
I am not sure if I need to change any security settings in the DBM provided by DB2 Connect? However, if I don't utilize COM+ service in my class and do the DB2 database access, everything works fine. So, it is something related to COM+.
Also, is distributed database transactions using MSDTC supported for DB2 on OS/390?
Please help....
Thanks
|
|
|
|
|
I am having problems using CoMarshalInterThreadInterfaceInStream/CoGetInterfaceAndReleaseStream. I have a smart pointer IXMLDOMDocumentPtr which I want to share between a few different threads. I want to marshal it across my threads. I am using the aforementioned functions to do the same. What I see is that both the functions above return an S_OK and I finally get a IXMLDOMDocumentPtr in the other thread. I can use XPath to select nodes etc but when I try to get the owner document an exception is thrown "Invalid access to memory location".
In thread A I do the following:
typedef MSXML2::IXMLDOMDocumentPtr XML2DocumentPtr;
XML2DocumentPtr pDocXML;
pDocXML.CreateInstance(CLSID_DOMDocument);
pDocXML->load( "c://config.xml");
IStream* pIStream = NULL;
IID iid = __uuidof(IXMLDOMDocument);
HRESULT hr = CoMarshalInterThreadInterfaceInStream( iid, pDocXML.GetInterfacePtr(), &pIStream);
In thread B I do the following:
IID iid = __uuidof(IXMLDOMDocument);
XML2DocumentPtr pDocXML = NULL;
HRESULT hr = CoGetInterfaceAndReleaseStream(m_pIStream, iid, (LPVOID*)&pDocXML);
m_pIStream has already been saved after the CoMarshalInterThreadInterfaceInStream.
When I use the pDocXML to query the xml document for elements, nodes I can do that. But when I use the elements and nodes to ask for the owner document in order to create a new element or a node, I get the above mentioned exception "Invalid access to memory location". Any ideas as to what I might be doing wrong?
|
|
|
|
|
Have you tried marshalling through the GlobalInterfaceTable (GIT) instead?Since you are using the same interface in multiple threads this could be a comfy solution by simply register all the interfaces you need in the GIT and get them in your threads.
Don't forget to revoke the interfaces when your done...
I assume you have initialized COM in your threads with calls to ::CoInitializeEx....
--
Roger
|
|
|
|
|
Here is the problem.
I have several ActiveX objects that comunicate with each other. There is a central object, invisible, registered as active object with RegisterActiveObject() and several other objects that comunicate with it. Methods of the central object are called through IDispatch and events are trapped by "plugging" (with Advise()) an interface pointer in central object's connection point for events. Comunication works fine as long as all the objects are in the same process, when i put the central object in another process it doesn't work any more, I get a CO_INITIALIZE exception. I've tried to call CoInitialize in central object's thread but it still doesn't work.
If anyone could help me i would be very happy.
Thanks in advance.
Marius
|
|
|
|
|
I have an dual interface from which i am derving another interface..when i implement both the interface in the same class and when i compile i am getting "error MIDL2020 : error generating type library : AddImplType failed "
error message.
any help please..
Thanks
|
|
|
|
|
I have a simple test automation server (Delphi) that contains two coclasses, Foo & Bar. Foo has two properties that return an instance of Bar. At startup, Foo & the first instance of Bar are created in the main thread. A side thread creates the second property instance of Bar. All threads are intialized multithreaded & all class factories are free threaded and multi instance. The problem is when a late binding client, such as vbscript, attempts to access the second property, it claims it is not an object
Set Prop = Foo.Property2
Access to first property is fine. Compile so that both instances are created in main htread, no problem. Even though marshalling shouldn't be required in mutithreaded, I tried that as well w no change in behavior. This could be a Delphi problem, but I wanted to check to see if this could be a known COM limitation
Thanks
Bill
|
|
|
|
|
hope someone can help
im converting a c dll to an activex control (apparently the users cant figure out how to use a dll in vb) and have managed to get most of it functioning in a skeletal kind of way ... what im stuck with is the data
the code reads data from an external source within the activex and ive made it store it in an internal buffer ... i cant seem to get access to the data from vb ... i keep getting an error along the lines of "data type not supported by visual basic"
my question is ... what data type should i use to read and store raw byte data in the activex such that it can be read by the vb app?
thnx
"there is no spoon" biz stuff about me
|
|
|
|
|
l a u r e n wrote:
what data type should i use to read and store raw byte data in the activex such that it can be read by the vb app?
Basically any type defined by OLE Automation. That includes standard Microsoft types, but also those that you have defined in IDL. This is assuming that your client is Visual Basic, and not VBScript. VBScript is utterly lame and will only handle standard OLE types and enums, AFAIK.
How are you exposing your data? Arrays? Linked lists? Structures?
Good music: In my rosary[^]
|
|
|
|