|
Thank you so much for your answer Santosh!
There is another thing I wonder also. When you build COM interoperated dlls and let VS do the work, is the tlb then usually embedded into the dll so that you can call the dll directly without having to go through the tlb?
|
|
|
|
|
That is correct.
VS embeds the type library within the DLL by default.
You can change that by removing the TYPELIB from the .rc file.
« Superman »
|
|
|
|
|
Thats why #import "XYZ.dll" regularly works. I use this sometimes to COM interop with MS-dll, ie msxml6.dll.
Greetings from Germany
|
|
|
|
|
Hi All,
Has anyone any idea on using the office web components for reporting.
I am trying to use it by giving reference in the .net web application, but none of the component is appearing on toolbox.
Do I need office 2000 installed on my machine?
I have OFFICE WEB COMPONENT 11 installed.
Please help!!
Thanks
|
|
|
|
|
Hi,
I need to set up a server Bulk Statement Download in my VMWare machine, I have copied all the files and folders of the existing server as it is. And loaded the required softwares and run the registries as it is from the existing server.
Copied the COM components and registered them in my new VMWare machine. Then made everything same including the OS and its Service pack same.
LDAP connections also same. Every thing same.
But the bulk statement download is working the existing server but not working in my WM machine.
Can anybody pls. suggest me what is missing, pls. help me because I am not good COM or VB programmer.
Please help me in this, as what else is missing.
Thanks a lot,
Abdul Aleem.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
Greetings everyone.
I have been doing things in C on *NIX platforms for a long while.
So, I am trying to jump in both feet first I guess.
I am breaking in my nice, new shiny Visual Studio 2008.
What I want to create here for educational purposes is a control that does sockets.
I want to use it in a language I am more familiar with that is Windows based.
I was thinking a control that had some methods, some properties and some events.
Some properties would be say, the remote port and the remote host to connect to.
A method I would want is when there has been data received... and some methods to connect, disconnect, etc.
I guess what I am getting at is implementing a socket engine.
The language in question (Visual Dataflex) to my knowledge cannot deal with anything that complex even with API calls.
I see that Windows has select() - that will work for my experiment and learning experience.
So, to move on I tried making one using the wizard, ended up with an MFC ActiveX control.
For giggles I named it 'test'
I found out that I needed to add methods by expanding the tree in the class view and the item in particular
'testlib' to reveal '_DTest' and right click -> add method.
So, ok.... my function.. return type... CHOKE.
What is CHAR as opposed to char? or CY?.. BYTE? .... BSTR?
Varying OLE_* and so forth....
The *only* one in the list that makes sense to me is 'void'
I just want a function like...
int connect(char *server, char *port) {..code..}
So, I started googling for what the 'equivalents' are to char, and int, etc etc.
Then, we have the parameters.... which have the same sort of names, some of them I am assuming are pointers of that type (like BSTR*)
So, to make a long story short I am very lost in the windows world.
I have done C in windows, but not in Visual Studio. (I have used 'edit' and gcc for a long time.. too long )
Is there any hope for a guy like me in the Windows world doing C/C++ ?
Anyone have any pointers to help me over these initial hurdles?
|
|
|
|
|
LoyalServant wrote: What is CHAR as opposed to char? or CY?.. BYTE? .... BSTR?
CHAR is currently a wrapper for the standard C char datatype. In MS-C++ Most of the upper case data types are wrappers for a standard data type[^].
Some MSDN reference:
Windows Data Types[^]
BSTR was not listed in that MSDN reference for some reason. It is basically a wide character/unicode string. Another reference:
BSTR[^]
LoyalServant wrote: Is there any hope for a guy like me in the Windows world doing C/C++ ?
Anyone have any pointers to help me over these initial hurdles?
The DCOM D-Mystified[^] series by Brian Hart[^] may be a good place to start. There are several articles in the series. To make your transition smoother you may want to pick up a few books.
My beginnings were also in the *nix world. I don't regret moving to Windows development, I find that my low level unix experience gives me an advantage in many cases.
Best Wishes,
-David Delaune
|
|
|
|
|
hi
i'm having troubles debugging an BHO with IE7 and VS 2008
i'm using the BHO from http://www.codeproject.com/KB/cs/Attach_BHO_with_C_.aspx[^]
the application is working fine for me
I searched to how to debug BHO. this is what I found:
"Set your IE home page set to about:blank . That way you can start up the browser as fast as possible and go where you need to. So, start up the first IE window. Then, from VS.NET use the Attach to Process item in the Debug menu to attach to iexplore.exe. Set breakpoints in your BHO. To break within the constructor, just open a second IE window."
I did that but it didnt work for me
it's just ignoring my breakpoints
do you know otherway to debug?
or maybe I'm missing something?
thanks
|
|
|
|
|
I am running into the same issue here, and have tried a few options already. Anyone know how to solve this one?
|
|
|
|
|
Hello,
Even after making all the possible changes in the InstallShield, I am still not able to get the CLSID in the registry while installing a software. What changes do I have to make in the InstallShield to get it done or how to enter CLSID in the registry?
thanks in advance.
Software Developer
Sanjay Khapre
|
|
|
|
|
|
|
Hi,
I have an application which opens doc file in its container but at the same time it creates another doc file on the system. User CUT and Paste this doc any where. I want this to avoid. Either by restricting user to CUT file OR Paste this file.
How to achive this? Pls Help
Thanks
SNI
SNI
|
|
|
|
|
Could it possible to open your document in other Editor like Acrobat Reader (PDF Format). You can solve this problem very easy in PDF. In Word document you can handle this situation by using Macro but its long way.
Thanks
Ali
Ali Zishan
London
|
|
|
|
|
Thanks for your reply but i want the event of CUT for .doc file.
SNI
|
|
|
|
|
Hi,
My Program is supposed to run contineously so i need to concern about memory management with COM.
Here is the scenario,
I created a COM Object using CreateInstance()
using that COM object i am creating another object using QueryInterface.
Here is my question.
1. if i am releasing the first object which i got using CreateInstance, then subsequently the objects which are created using that will be removed from memory right?
Since if i call release for object got using QI causing crash.
But i am fine if i release the first object, but i am afraid this would lead to a memory leak issue.
Kindly Advice!
Thanks in advance
-Ganesha
Thanks a lot
|
|
|
|
|
Unless the second object is aggregated in the COM sense, i.e. it's a server that lives inside another server, thou-shall-not-create-objects-with-QueryInterface!
QueryInterface has a well-defined purpose and functionality: you ask a COM object you already have an interface to for another interface, the object returns that interface if it implements it and fails with E_NOINTERFACE if it does not implement the requested interface.
If such functionality is desired you should create an interface function that clearly says it will create another COM object.
ganesa moorthy wrote: if i am releasing the first object which i got using CreateInstance, then subsequently the objects which are created using that will be removed from memory right?
Not if the object still has clients, i.e. it's reference count has not reached zero.
It looks to me as you two objects are too tightly connected.
If you make them available in the same server (COM object) but perhaps reachable from different interfaces, you can use QueryInterface correctly.
Another alternative is to make the two objects less connected and actually have two different COM objects.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Dear All
I have very simple question what is difference between COM and COM+
What are the uses of these both technologies
Thanx in advance
Sajjad
|
|
|
|
|
I think asking Google will be useless [^], in you case.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
COM+ is a refined version of COM. COM+ also supply a number of service to component running under Windows, including
1. Role-based security
2. Object pooling and reusability
3. Queued components for asynchronuous calls
4. Transaction processing
5. A publish-and-subscribe events model
Ali Zishan
London
|
|
|
|
|
Hi,
Basically COM+ = COM + MTS (microsoft tranaction server).
COM+ is built using Aspect Oriented Design.
Aspect oriented design are like some aspects(security, pooling etc) that you can use from the framework and not required to progrm by yourself.
this is what COM+ provides once you create a COM+ application and register you componet with that.
^-^
@|@
- redCat
|
|
|
|
|
Hi,
I am having a COM Component and i am accessing the com using VB client.
In Com function i am using SysFreeString, i am calling a function inside COM DLL by passing a string argument from vbclient.
After usage i am calling SysFreeString inside the com function.
The above mentioned functionality works on several machines and fails(VB client crashes) in one machine.
I removed the SysFreeString function call from the failing machine, and now it is fine.
Can anyone tell why this happens so strangely ? Anyway we need to call SysFreeString to free up the memory.
Kindly guide me!
Advanced Thanks,
Ganesha
Thanks a lot
|
|
|
|
|
Hi,
I can't say why one machine behaves differently, in fact I would say if you can fix the code so it works on all machines you don't need to know.
All my VB -> COM was done in Visual Studio 6 and used IDL rather than attribute based which yours may be but the issues should be the same. What IDL attributes are applied to the string being passed, an [in] or [in,out] or possible [retval]?
As you are freeing the string in the .dll, I'm assuming its an [in]?
|
|
|
|
|
Hi,
[in], [out], and sometime [out,retval]
Advanced Thanks!!!!
Thanks a lot
|
|
|
|
|
That seems right, I think VB passes strings by reference so it has to be [in,out]. As there is an out] part, VB expects a string to be passed back (out) and is probably deleting this according to some garbage collections algorithm - but you've already done it in the dll. I think not deleting it in the .dll is OK here - you would only do this if it were an [in]. You could delete it in the dll but only is you then assign a new string to it for the [out] part - it's this [out] part that VB is expecting and deleting.
|
|
|
|