|
Hello,
I need the updated WUA header files from M$ for a project.
(http://msdn.microsoft.com/library/en-us/wua_sdk/wua/updating_windows_update_agent_header_files.asp)
Unfortunately are the links on their site broken.
Where can I download the file wua_api_headers_i386.EXE?
And can somebody help me with code snippets for beginning with the WUA api?
Please.
Thanks.
Amd Opteron
|
|
|
|
|
In VS 2003 one may find two different looking web browser controls. One from .NET named the AxWebBrowser1 and the other thru' the interop via COM. What is the purpose of this second one whose object name is WebBrowser? Can this be used together with MSHTML for some application? This one has no visiblity except its availability thru code. I am interested in knowing whether it was included to the C++ developers or does it have any other utility.
|
|
|
|
|
I am new to COM technology.
I am tryimg to write my first componant but it gives error.
i.e error in loadimg library file
Pl'z go through the code........
I gave proper address of unknwn file ,still it gives error.
#import "unknwn.idl"
[
object,
uuid(C21D0200-2FB6-11d2-8952-444553540000),
helpstring(“Car driving”)
]
interface ICar : IUnknown
{
HRESULT SetSpeed( [in] long nSpeed );
};
[
object,
uuid(C21D0200-2FB6-11d2-8952-444553540000),
helpstring(“Engine control”)
]
interface IEngine : IUnknown
{
HRESULT Start();
HRESULT Stop();
};
[
uuid(310C97F4-3ABE-11d2-915E-52544C004D83),
version(1.0),
helpstring(“Car library 1.0”)
Distributed Computing Topics
PART V
816
]
library YourLib
{
importlib “stdole2.tlb”
importlib “stdole32.tlb”
[
uuid(310C97D0-3ABE-11d2-915E-52544C004D83},
helpstring(“Car class”)
]
coclass Car
{
[default] interface ICar;
interface IEngine;
};
};
Yuwraj
|
|
|
|
|
Yuwraj,
please note that messages posted in these forums are coming from real persons and not compilers. Hence do not post messages that are kind of the-following-code-contains-errors-please-find-them without any explanation.
Describe the error, what environment you are using and what you are trying to do and then, maybe, someone can provide you with some help.
The more information you give about your problem, the more detailed help you can be given. This is also why your post has not been answered earlier.
Now, about your code...
Both IEngine and ICar have the same UUID in the code snippet you posted.
If this doesn't help you, post some more information about what errors you get when you're building.
--
Roger
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
LIBID and CLSIDs are equal too. Not that I think that will mean any problems. The two IIDs will however.
|
|
|
|
|
Hello Yuwraj !
When I objserved you code, I found two things :
1. you put same IID for both the interfaces
2. same ID for class and library.
But actully all these are to be different. so, put different IDs for all the elements...
- Malli...!
|
|
|
|
|
Hi
I try to write an Web Application on wich you can draw some
lines using the inkobj.dll.
In ASP.net, no Problem. You have to create an Windows.Forms.Control wich
you can call from an <object> Tag in your ASP.net Webapp.
I just want to know if it's possible to draw some lines using
classic ASP and the COM Object.
Some Code:
<br />
var oInkColl = Server.CreateObject("MSINKAUT.InkCollector");<br />
oInkColl.hWnd =
I think hWnd needs an Form Object.. How can I say that the Window is the IE?
I that possible?
|
|
|
|
|
Has anyone worked with the Ericsson Solidus COM?
|
|
|
|
|
please help me:
i have to create an extension for thunderbird not for firefox so i want tutorial for how to create extension and use this.
reply me ASAP.
Bankey Khandelwal
Software Engineer
bankey.khandelwal@solversa.com
|
|
|
|
|
I get this message when I use mshtml in vb.net. I am trying to declare a variable doc as New mshtml.HTMLTextElement
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in test.exe
Additional information: COM object with CLSID {3050F4BA-98B5-11CF-BB82-00AA00BDCE0B} is either not valid or not registered.
I find the CLSID in Googles' folder in HKEY_USERS with the same qualification, that is:
CLSID {3050F4BA-98B5-11CF-BB82-00AA00BDCE0B} is either not valid or not registered.
Could it be Google's search somehow getting into the registry?
Any clues? hints? suggestions? links?
|
|
|
|
|
Hi,
I have two questions :
1) How would you create a singleton ATL COM Class? (Like when you do a CoCreateInstace for the interface, you always get the same instance of the class)
Right now I did a work around of declaring all the data as static variables.
I also read about a macro called as DECLARE_SOMETHING_SINGLETON (Not sure about the correct name)
2) I also have some global functions in the same COM Class. These global functions need to access the COM Class member functions. So the global functions need to access only the single instance of this COM Class at any cost. My COM Component is an Out-Proc Win NT Service.
The global function code looks like
CALLBACK Global_Fn()
{
//call the class's function
CCOMCLASSA *pA = NULL;
pA->MemberFunA(); //this is crap piece of code, but due to static vbles, it is working as of now
}
Any ideas to do all this elegantly? All help will be greatly appreciated.
Thanks
Misha
|
|
|
|
|
1. You're thinking of the DECLARE_CLASSFACTORY_SINGLETON macro. You'd use it like this:
class ATL_NO_VTABLE CYourClass :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<Csadfas, &CLSID_sadfas>,
public IDispatchImpl<Isadfas, &IID_IBlah, &LIBID_ATLPROJLib>
{
DECLARE_CLASSFACTORY_SINGLETON(CYourClass)
2. Given that the class factories have been registered (it's an .EXE server) using the CoRegisterClassObject API you can safely and efficiently implement your globals like this:
void MyGlobal()
{
CComPtr<IMyInterface> spInt;
if ( SUCCEEDED(spInt.CoCreateInstance(CLSID_YourCLSID)) )
{
spInt->YourMethod();
}
}
Steve
|
|
|
|
|
Thanks Steve
|
|
|
|
|
I am again into dilemma here. I am sorry, very new to COM programming.
The problem is:
I have two kinds of functions in my COM class.
1) Functions that are exposed via the interface
2) Internal routines of the COM class which the global functions/main program may need to call
So if I am creating a COM Class, does it mean that the only link to my COM Class should be via the interface routines? i.e. all the internal routines which require to be called by the global functions also need to be exposed as interface routines?
So what I gather from this is that if somebody wants to access your COM Class (from anywhere, say the winmain routine of your service or some global function in your COM Class itself etc), it has to be via the interface pointer only.
Any help greatly appreciated.
Thanks & Regards,
Misha
|
|
|
|
|
The easiest way (not pretty to look at) is to make your functions look like this:
void MyGlobal()
{
CComPtr<IMyInterface> spInt;
if ( SUCCEEDED(spInt.CoCreateInstance(CLSID_YourCLSID)) )
{
CYourClass* pClass = static_cast<CYourClass*>(spInt.p);
pClass->YourMethod();
}
}
Steve
|
|
|
|
|
I think it won't work that way. Maybe (and I'm not sure) only if the COM object is created within the same process. In that case you could do like:
CYourClass * pClass = new CYourClass();
instead of creating any com object.
|
|
|
|
|
I was assuming that the globals you were talking about where in the COM server - In which case the technique I gave will work. You couldn't just create a new class each time because it wouldn't be a singleton in this case. If the global you're talking about are meant to be in the client then this technique will not work - But in that case the only real solution is to expose the functionality as COM interfaces.
Steve
|
|
|
|
|
Thanks Stephen,
I was looking all over the internet for an answer to this. And to say it was just a macro DECLARE_CLASSFACTORY_SINGLETON.
|
|
|
|
|
Glad to be of help. A 2006 post I notice....
Steve
|
|
|
|
|
Can anyone tell me how to use CFSTR_FILECONTENTS and CFSTR_FILEDESCRIPTOR clip board formats in file Drag and Drop?
Thanks and regards,
Anil
|
|
|
|
|
Is there other way to use COM library in a managed code without registration with regsvr32 util on a server? The problem issues from an installation application on a server. I am developing web application and can only upload sources. But how can I register COM library?
Thanks for any advice.
|
|
|
|
|
Hi,
I have gone through and added a COleProperlyPage to a ActiveX Control I have to make. I have two property pages, the first one was already in the ActiveX Control, I have a string in a textbox in the property page that I need to update and send to the second COlePropertyPage.
I am using DDP_Text( ... ) and it works for the first time so the second propertypage gets the correct result, but then I go back to the first ColePropertyPage and change the text string and it doesnt update when I click the tab to go back to the other COlePropertyPage.
Does anyone know what is going on here.
Thanks in advance
|
|
|
|
|
hi
could anyone post the link to download COM specification??
i searched Microsoft website but didn't get the exact link..
thanx in advance
|
|
|
|
|
|
I need to pass a c++ object to the COM client. I saw a few articles on the same.
But those were objects in which there was just a single memeber. I need to pass a
c++ object which has several subclasses as its members.
If anyone could shed some light on this it would be very helpful.
Thanks in advance,
ann
|
|
|
|