|
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.
|
|
|
|
|
|
I have a COM dll written in c# that is being called from various c++ applications. On only 1 machine so far, I am having the application that calls the COM dll just dissapear and unload. I am unsure what is happening. I have try catches all through the code trying to catch the exception getting thrown, but it doesnt catch, just unloads.
What types of exceptions or security issues would cause the entire application to unload without getting caught? It is worth noting that so far the only applications that are failing are VS6 MFC apps. Apps that are built in VS2005, or that are instantiated in a .net environment do not produce this issue.
The scenario is this. C++ app calls VS2005 dll which holds refrences to the c# COM dll. 2005 dll calls into c# COM which provides webservice access to the caller.
It is also worth nothing that a static method calls a singleton class in the C# COM dll. (Singleton is for websvc access). I know it is not much to go on, but I need ideas about general security problems or COM issues with what I have described, or even what type of exception is uncatchable and unloads the app .
Thanks in advance.
|
|
|
|
|
Usually an app going *poof* is caused by the instruction ptr sending it off into the Twilight Zone.
Most likely your TLB's and DLL's are out of synch. I.e. your application was compiled against a TLB that does not match the DLL.
|
|
|
|
|
Depends what is meant by “poof”. Normally, in the circumstance you describe (“instruction ptr sending it off into the Twilight Zone”), you'll get some kind of “this application has performed an illegal operation and will be terminated” dialog before it’s terminated. There are some situations where the damage to the process is such that the OS can’t get that far and the application simply vanishes without any warning whatsoever. One cause of this is a corrupted EXCEPTION_REGISTRATION linked list.
Steve
|
|
|
|
|
Well... I guess I could have my files out of sync... anything is possible at this point. It is one of those issues that makes you pull your hair out.
I get no information whatsoever from this. I do know from my tracing that it is blowing away in the COM assembly itself, right when it is about to access the webservice. It always goes away at the same place.
It just seems odd that it would only be these 2 MFC apps that would get messed up when at least 8 other applications (VS2005 or .net encapsulated admittedly) use the same assembly.
At first I thought it was a security problem, so I demanded unrestricted permission... and no exception. I just wish there was a way to figure out what was going on. This machine does not have VS and can not have it installed, so I have to debug with tracing. Not very helpful for this scenario.
|
|
|
|
|
What about the debugging tools for Windows (WinDbg, etc.)? These are not as easy to use as VS, but I have been able to find some deep and nasty problems with them. It was a similar situation where I had to debug in release mode with no VS.
modified on Thursday, March 5, 2009 2:57 PM
|
|
|
|
|
hi all
I have a BHO program which tracks visitors on websites
what is the best way to collect the data and send it to my database ? (cookies, AJAX, XML, other )
|
|
|
|