|
Perhaps, it really depends on what's in your VARIANT. If it contains, say, an Int or a BSTR there's really no need. Once you have a VARIANT that contains a pointer to something else it can get a bit more complicated.
|
|
|
|
|
is it possible to write a program which can register activex in windows vista automatically?(in fact i want find a way to register activex in vista when i wasn't administrator)
|
|
|
|
|
I've never tried it but read a recomendation[^] to use HKCU\Software\Classes instead of HKCR or 'side-by-side' COM to do away with registration.
|
|
|
|
|
|
Hi
i read your link, but i don't know how can i do that? (to use HKCU\Software\Classes instead of HKCR)?
would you tell me more about this? thank you
Zo.Naderi-Iran
|
|
|
|
|
As I said I've never tired it and just read a recomendation. I did a search for 'HKCU Software Classes' etc on Code-Project and there seems more there than I could pass on here.
|
|
|
|
|
oh, thank you
Zo.Naderi-Iran
|
|
|
|
|
I want to write to a bmp file and read from it from a COM dll, kindly give me a quick solution.
|
|
|
|
|
There is nothing COM related here.
You can still use CreateFile , ReadFile , WriteFile for one.
You could also use fopen or fstream etc.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
i need its source file
Sujit Sahu (Cruel Handsome)
|
|
|
|
|
Hello, i have got a big problem:
I have put the AvtiveX control "Microsoft RDP Client Control 2" into a MFC dialog. Now i want to do the settings like server, username and password. In VB.NET its easy. But how can I set up the password ? It seems to be a bit difficult to set up the settings behind "AdvancedSettings2" in C++.
After the command "get" there is an LPDISPATCH result, but I dont know how to handle with it to set up the password. Please help ...
.NET:
Form_RDP.RDP_Client.Server = "demo.demo.de"
Dim username, passwort As String
username = "demo"
passwort = "demo"
' Herstellen der Remotedsktopverbindung
Form_RDP.RDP_Client.UserName = username
Form_RDP.RDP_Client.DesktopWidth = 1024
Form_RDP.RDP_Client.DesktopHeight = 786
Form_RDP.RDP_Client.AdvancedSettings2.ClearTextPassword = passwort ' !!!!!!
C++:
m_mstscax1.put_Server("demo.demo.de");
m_mstscax1.put_UserName("demo");
m_mstscax1.put_DesktopWidth(1024);
m_mstscax1.put_DesktopHeight(786);
LPDISPATCH result;
result = m_mstscax1.get_AdvancedSettings2();
|
|
|
|
|
The method "get_AdvancedSettings2" implies you get back a IMsRdpClientAdvancedSettings2 interface. Actually you get a pointer to an IDispatch interface (LPDISPATCH) result. In the C++ you can, I think then call QueryInterface on the IDispatch within 'result' to get a IMsRdpClientAdvancedSettings2 interface which presumably will provide the methods you need to call.
|
|
|
|
|
Hi, could you explain how to handle this IDispatch-thing with QueryInterface?
Would be nice to understand this stuff a little more
|
|
|
|
|
m_rdp.put_ColorDepth(8);
m_rdp.put_Server(_T("150.245.178.27"));
m_rdp.put_UserName(_T("yushb0602"));
m_rdp.put_Domain(_T(""));
m_rdp.put_DesktopHeight(1000);
m_rdp.put_DesktopWidth(1000);
IMsRdpClientAdvancedSettings adv(m_rdp.get_AdvancedSettings());
adv.SetClearTextPassword(_T("yushb0602"));
m_rdp.Connect();
|
|
|
|
|
Hi all,
I have .net dll generated with vb.net code, can I run this dll as com component??
Thanks for help
|
|
|
|
|
You must make in COM visible.
Look at the [ComVisible] attribute.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I have a TLB that i want to register. I tried with regtlibv12.exe but i dont see the CLSID's in the registry, i could only see IID's. And in the code im getting "Class not registered" error.
what could be the problem?? Any suggestions??
|
|
|
|
|
Maya_ wrote: I have a TLB that i want to register. I tried with regtlibv12.exe but i dont see the CLSID's in the registry, i could only see IID's.
Of course, since you have only registered the typelib and not the server.
What you have registered with the typelib is only related to the interfaces and possibly a declaration of CLSIDs if the typelib contains a "coclass" section.
This means that you have only provided information in the registry for using typelib marshalling when a server is created that implements one of the interfaces that are described in this typelib.
To register a server that resides in a DLL you usually use RegSvr32.exe and provide the path to your DLL as an argument to RegSvr32.
If your server is an exe-server you usually run it once and it will register itself, or with a command line argument such as "regserver".
This will add the CLSID key in the registry among other things and afterwards, provided that the registration was successful, clients will be able to create instances of the server.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
|
Hi folks,
we got some application that offers a COM DLL (in process) interface - lets call it daemon-app.
Also we have a client that uses this offered COM object (client-app) - the client runs on many machines on our LAN - so there also on every machine need to install and administrate the daemon-app (to provide the COM DLL interface).
For performance reason - and also to save energy (switching off the client pcs) - I would like to proxy this COM DLL interface (provided by daemon-app) by TCP.
this is how its currently set up:
Client -> COM DLL -> Daemon
This is how I would like it to be:
Client -> COM DLL Proxy Client -> TCP -> COM DLL Proxy Daemon -> Daemon
While the Daemon runs only on one big Server.
There is no way for me to change the Client or Daemon code - these are compiled programs, that I have no access to. I got the SDK for the COM DLL - and its for sure it can handle multiple instances without any problem.
No I could go - use a IDL file and compile a empty COM DLL and forward by hand all the Methods and Events through TCP. Then I would unregister the COM Dll and register mine - start the COM Dll deamon on the Daemon-Machine and done...
Except this would take a year or so - the Com is quite complex with many interfaces...
So my question is:
Is there any mechnism to generate a COM DLL proxy through TCP automatically?
Thanks to all of You for reading!
|
|
|
|
|
The first thing that comes to mind is DCOM. As well, I definitly remember an article that resulted in me being able to make a COM call to a dll running in a microsoft .exe wrapper, dllhost.exe on a networked PC.
|
|
|
|
|
Hello Jonathan,
this article would be very helpful - in case You can find it, please forward it to me.
Thanks a lot
|
|
|
|
|
hi,
I have a query like wats the diff between COM components , active x , OLE , OCX etc
I dont know how many hits i made in google but not got satisfactory answer and always i end up with more confusion as every 1 states different words.
So, can any one please clear me and please be specific.
thanks
Thanks & Regards
Manish Singhal
Software Engineer
Maxworth systems(Delhi)
|
|
|
|
|
It IS confusing. I would recommend this article: Introduction To COM, Michael Dunn[^], as a preliminary explanation. Also, an excellent review is: Inside COM+ Base Services[^]
As COM evolved, Microsoft released a number of proprietary implementations, and invented new names to distinguish the various, existing libraries. First was OLE, which was released before 1996, with their reigning operating system (Windows 95). You can search MSJ (Microsoft System Journal, the precusor to MSDN Magazine) for introductory articles about OLE for difinitive information, for instance: Don Box, Introducing Distributed COM and New OLE Features in Windows NT 4[^]. ActiveX components are COM components, and usually have the OCX extension (but, can be compiled as a DLL), and were initially intended as Web Page objects, to add functionality to Web sites. Check this out: Build OLE Controls for the Internet That Are Fast, Smart, and Interactive[^]
The problem is that once you release a COM library component, you can't alter it, recompile it, and re-release it with the same name (this usually introduces breaking changes into client applications).
COM classes that export functionality are supposed to be registered in your system registry (and have well-known value keys, like InProcServer). Launch OLE COM Object Explorer OLE COM Object Viewer, MSDN[^](which lives in the Tool folder of your Visual Studio install directory), and investigate the existing registered components on your system to get an idea of just how pervasive this technology.
|
|
|
|
|
Hello all,
One of my works requirement is customizing the context menu in inspector window of a MS outlook.
Details regarding it are as follows:
when we right click on a email-id(the one that is in front of a From: or To ,
a context-menu pops-up.I want to add some items in it.
How this can be done? and what events should be handled?
i am writing a component in vc++ & working with outlook 2003.
reply me on n.chudekar.31@gmail.com
thanks in advance.
|
|
|
|