|
Try to figure out what you want. DLL and COM have little relationship. DLL is a format of library and COM is a component technology. Almost all Windows libraries are delivered as DLLs, but only small portion of them are COM compoenets. You may create DLLs without knowing COM and COM components can be delivered as DLLs as well.
Do you want to create DLLs or COM components?
Best,
Jun
|
|
|
|
|
I know what I want, maybe you should read what I had written again before answering... Pardon me for my rudeness as I do realise that you seems to be very experience... one puzzling issue is that you recent replies do not seems to match your experience.. if fact it seems like an amateur
I said that I had did a COM DLL project, a DLL written in a form of COM component.
Currently what I found out was that written DLL in COM component is one of the latest way of writing a DLL. I just need to if there were any newer way of writing a DLL.
-- modified at 22:09 Wednesday 21st June, 2006
|
|
|
|
|
Just tried to help and learn.
I have to disagree that COM is a DLL technology. It's not.
Best,
Jun
|
|
|
|
|
Yes, I do understand that COM is not a DLL technology.
But it can be used to create a DLL and it is one of the more advance method of writing a DLL.
I was just hoping to know if there is any other methods to write a DLL other than this and the older method that exports the function.
I apologise for my rude reply again.
|
|
|
|
|
you can have a:
* .lib file which is a static linking library which exports c functions.
* win32 dll which exports c functions.
* mfc extension dll which exports c++ classes.
* com dll which exports ( export is not the right term but exposes)component
classes.
* u can have an ocx which again exports/exposes componentclasses
* u can have a .net managed dll which exports managed types.
All these are valid ways of creating a dll or a dynamic/static linking libraries.'
cheeeeeeeeeeeeeers ...milton kb.
|
|
|
|
|
Hello again,
how can i split CComBSTR Strings?
Example:
<br />
CComBSTR myStr = "iwantto-splitthis";<br />
Is it possible to split it by a special character like - to get two separate strings "iwantto" and "splitthis"?
Maybe I have to convert the CComBSTR to a readable format first.
<br />
LPTSTR myLptStr = new TCHAR[SysStringLen(myStr)];<br />
lstrcpy(myLptStr, OLE2T(myStr));<br />
But then, i still want to split it by -
Thanks in advance
|
|
|
|
|
The code you gave has problems. Firstly SysStringLen does not include an extra count for a NULL terminating character. You allocation should look like this:
LPTSTR myLptStr = new TCHAR[SysStringLen(myStr)+1];
Steve
|
|
|
|
|
Thanks for the hint, Steve.
Still lost with CComBSTR substr problem
|
|
|
|
|
One way:
CComBSTR myStr = L"iwantto-splitthis";
LPCWSTR pBegin = myStr;
LPCWSTR pEnd = pBegin + myStr.Length();
LPCWSTR pBreak = std::find(pBegin, pEnd, L"-");
if (pBreak!=pEnd)
{
CComBSTR FirstBit(pBreak-pBegin, pBegin);
CComBSTR EndBit(pEnd-pBreak-1, pBreak+1);
}</code>
This code assumes you've included <algorithm>
This is probably not the easiest or the best way but it should work (but I haven't tried it!).
Steve
|
|
|
|
|
Hi..
May any one tell me what is the best way to start learning COM programming?
"I am too late but i will never give up"
|
|
|
|
|
TheEagle wrote: May any one tell me what is the best way to start learning COM programming?
Programming.
Best,
Jun
|
|
|
|
|
May you tell me what is the best way to start learning COM Programming?
"I am too late but i will never give up"
|
|
|
|
|
Hi,
I managed to get myself started with one of the article in this forum that shows some very easy examples for beginers.
One think about COM is do you want the learn to do the full coding by hand. If that's the case, you may want to read up Essential COM which is highly recommended in this forum. It will show you some of the things that happen in the developement of the COM technology.
If you need to get something up fast, you may want to work with the ATL. There are plenty of articles on using ATL in this forum.
|
|
|
|
|
I have found them as you told me..thank you very much.
"I am too late but i will never give up"
|
|
|
|
|
Hi all,
I'm trying to put together a baseline example of integrating an ActiveX control with IE. I've built an MFC ActiveX control from the wizard and modified the OnDraw to draw a black ellipse rather than white.
My HTML looks like this:
<object id="activex"
CLASSID="CLSID:68D632F8-1644-44EA-9C71-725171D59E8E"
CODEBASE="http:AX2.ocx#version=1,0,0,1" height="300" width="300"/>
And the class ID is coming from the idl file:
[ uuid(68D632F8-1644-44EA-9C71-725171D59E8E), version(1.0),
helpfile("AX2.hlp"),
helpstring("AX2 ActiveX Control module"),
control ]
library AX2Lib
Does this look reasonably correct? Are there any references on ActiveX for IE that you'd recommend?
Marc
Pensieve
Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
|
|
|
|
|
<br />
CODEBASE="http:AX2.ocx#version=1,0,0,1"<br />
That http: looks rather odd there.
From the snippet it appears that you might be using the wrong classid. You need to make sure your .rgs file has the proper registration info in it as well.
Any reason you're using MFC and not ATL? Do you need the bloat?
Todd Smith
|
|
|
|
|
Todd Smith wrote: Any reason you're using MFC and not ATL? Do you need the bloat?
No, it was just a "start here and see what happens" attempt. You're the second person to recommend ATL, so, I'll investigate that next.
Marc
Pensieve
Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
|
|
|
|
|
ATL is in my opinion a lot smarter for doing ActiveX stuff. Will you be creating windowed or window-less controls? If you are going to create windowed ActiveX controls, I really do recommend that you add some WTL to reduce the Win32-ish coding.
If you are going to create window-less controls, the ATL wizard will put you on the right track.
BTW, to reduce compilation times, you may want to drop the "attributed" stuff. If you use the attribute-stuff (looks like .NET-attributes), the compiler will recompile the "hidden" IDL file everytime you recompile. If it's a small project, it will double the compilation times.
--
100% natural. No superstitious additives.
|
|
|
|
|
Marc Clifton wrote: CODEBASE="http:AX2.ocx#version
When I deployed an activex over the web, which I've really only done once, I made a .cab file with the .ocx, other support files and an .inf that contained all the installation info (default registry settings, etc).
The coolest part was that all I had to do was change the FileVersion # in both the .inf and html, then recreate the .cab and the .ocx would be automatically updated the next time people visited the site.
This is the html:
<OBJECT ID="MyOcxID"
CLASSID="CLSID:68D632F8-1644-44EA-9C71-725171D59E8E"
CODEBASE="MyCabFile.CAB#version=1,0,0,1">
</OBJECT>
Also, this might help:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaxctrl/html/msdn_deplactx.asp[^]
----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
EricDV wrote: The coolest part was that all I had to do was change the FileVersion # in both the .inf and html, then recreate the .cab and the .ocx would be automatically updated the next time people visited the site.
Thanks for the pointers! I'll look into it.
Marc
Pensieve
Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
|
|
|
|
|
As far as technology is concerned:
if performance is what u r looking for, ofcourse ATL,WTL is the choice.
if development time and developers are the concern then VB6 is better, or even you can go for .Net controls with interop.
Regarding the code:
If you are using the html on a local computer, then u dont need to specify CODEBASE attribute. ie you can open the html by typing c:\axdemo\ax.htm in the explorer address bar without that CODEBASE attribute.
But if you need to acess it over http then you have to specify the CODEBASE atribute. either this can be a direct http based url to the ocx or it can be a .cab file to reduce download time.
download Activex Ccontrol Pad[^] from micorsoft for generating the html. They will do everything.
cheers ...Milton kb
|
|
|
|
|
Hi all,
i am about to write a BHO for an e-learing application. What I need is a non-blocking Timer for the Refresh of the browser. How could i use a timer to refresh every 5min or so without blocking the Browser Window...?
Still haven't got Scott Roberts famous book about IE Programming.
Thanks for your help
|
|
|
|
|
How to use executable(exe) and service exe with the client?
Is it same as using Dll with client?
Any sample links please?
Thanks
Row
-- modified at 8:02 Tuesday 20th June, 2006
|
|
|
|
|
I have a win32 library with no interfaces , just only exported functions.
e.g. One of those is .. bool getInfo (char *string, int counter);
I created a ATL exe , inserted a simple object.No I want to link the above library to my ATL project.
So in Project->settings->link, I gave the lib name and directory of the lib file.
Now I want to use this function getInfo in my atl program.
SO I added one method in my interface say CallLibFunction
And in that method I want to call getInfo..
Are these steps ok?
Row
|
|
|
|
|
Row wrote: Are these steps ok?
Yes,
These are the correct steps to add the library into project.
Knock out 't' from can't,
You can if you think you can
|
|
|
|