|
It is a MFC extension dll. 3rd party module does uses MFC.
|
|
|
|
|
You mean the program hosting .ocx? Does it link dynamically with MFC?
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
I don't have the code for host application.So i don't know anything. Also it works fine, if i link my MFC dll using static library.
|
|
|
|
|
The rule is quite simple: you can create MFC extension .dlls *only* if client app (the OCX host in your case) is linking dynamically with MFC.
Seems you'll have to switch to regular DLL or link statically.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
If i switch to regular dll also i will get that problem.
Any idea?
|
|
|
|
|
If you switch to regular DLL then your .dll interface must be C-style, e.g. no MFC objects passed around --and-- each exported function must have AFX_MANAGE_STATE macro.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
I had tried that but same result.
If i
a)link statically or dynamically
OR
b)make it a regular or extension dll
also if i have MTD or MDD then only it works in the release mode.
|
|
|
|
|
Just an obvious note, but make sure that you are using the appropriate
dll build.
The debug and release compilation of your dlls are not compatible!
The debug DLL produced will NOT work with the release build of the client using it. Debug Client -> Debug DLL [AND] Release Client-> Release DLL.
-Chin-
|
|
|
|
|
Neha wrote:
Could any one pl tell me why is it happening so?
It's most certainly because of you limiting the input set. Last I checked "pl" was the country letters for Poland, and if you only want answers from Poland, perhaps you have stumbled in on the wrong site?
Yes, I'm an a**hole, but at least I try to spell!
|
|
|
|
|
I created a CDblyLinkList<t> class and put into DblyLinkList.h and DblyLinkList.cpp file in a common folder of many projects.
In the header file declaring CTIFRowset, of a DLL project, I included "..\common\DblyLinkList.h", and the class has a variable m_rowlist of CTIFRowList, which is typedefed in CTIFRow header file as CDblyLinkList<ctifrow *="">.
The CDblyLinkList.h and CDblyLinkList.cpp were added to the DLL project.
When I built it, all compiles correctly, but i got many linking errors like:
Tracy error LNK2019: unresolved external symbol "public: __thiscall CDblyLinkListIterator<class ctifrow="" *="">::CDblyLinkListIterator<class ctifrow="" *="">(class CDblyLinkListIterator<class ctifrow="" *=""> &)" (??0?$CDblyLinkListIterator@PAVCTIFRow@@@@QAE@AAV0@@Z) referenced in function "public: __thiscall CTIFRowset::CTIFRowset(class CTIFRowset &)" (??0CTIFRowset@@QAE@AAV0@@Z)
|
|
|
|
|
Did you create CBlyLinkListIterator copy constructor? Or is it only declared in .h file?
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
yes, i did declared the copy constructor. The error I shown was a instance of error. Actually, it has many, such as:
Tracy error LNK2019: unresolved external symbol "public: class CDblyLinkListIterator<class ctifrow="" *=""> __thiscall CDblyLinkList<class ctifrow="" *="">::end(void)" (?end@?$CDblyLinkList@PAVCTIFRow@@@@QAE?AV?$CDblyLinkListIterator@PAVCTIFRow@@@@XZ) referenced in function "public: __thiscall CTIFRowset::CTIFRowset(class CTIFConnection *)" (??0CTIFRowset@@QAE@PAVCTIFConnection@@@Z)
Tracy error LNK2019: unresolved external symbol "public: __thiscall CDblyLinkListIterator<class ctifrow="" *="">::CDblyLinkListIterator<class ctifrow="" *="">(class CDblyLinkListIterator<class ctifrow="" *=""> &)" (??0?$CDblyLinkListIterator@PAVCTIFRow@@@@QAE@AAV0@@Z) referenced in function "public: __thiscall CTIFRowset::CTIFRowset(class CTIFRowset &)" (??0CTIFRowset@@QAE@AAV0@@Z)
Tracy error LNK2019: unresolved external symbol "public: void __thiscall CDblyLinkList<class ctifrow="" *="">::erase(class CDblyLinkListIterator<class ctifrow="" *="">)" (?erase@?$CDblyLinkList@PAVCTIFRow@@@@QAEXV?$CDblyLinkListIterator@PAVCTIFRow@@@@@Z) referenced in function "public: bool __thiscall CTIFRowset::Delete(void)" (?Delete@CTIFRowset@@QAE_NXZ)
The declaration was in a .h file, and implementation was in a .cpp file.
|
|
|
|
|
I think in Template Classes you have to add an include statement to the implementation file in the header file.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Original post mentions that both .cpp and .h are parts of project.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
No i mean in the header file you should
#include "poo.cpp",
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Now I got what do you mean. Yes, this may have been the problem
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
1) since CP forum code strips triangle brackets by default, use 'display this message as-is (no HTML) option. I'm not sure if your CDblyXXx classes are actually templates (probably they are).
2) you can't link DLL or EXE?
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
Anonymous wrote:
The declaration was in a .h file, and implementation was in a .cpp file.
That's the problem. Due to a limitation of templates, template code has to be visible in all CPP files, so move the code to your header file.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Sir, I want to make new CSocket object from SOCKET type variable. This SOCKET variable is associated with open socket connection. How can I do it?? would you please help me.......
C.R.Naik
|
|
|
|
|
|
Hi all,
I have a VC module that processing DB on SQL Server and will return a result (number, string,..). Can I rewrite that module so that it can be called from an ASP page on IIS as a function ? How will I do it?
Thanks for your help
|
|
|
|
|
Depends on the complexity of the module. You could write the code again in ASP using ADO to access the database. Or you could wrap your module as an ATL COM component.
Michael
Programming is great. First they pay you to introduce bugs into software. Then they pay you to remove them again.
|
|
|
|
|
I would like to load a bitmap file and print it.
I need also to view it in the print preview.
Can anyone send me a simple MFC sample for that?
Thanks,
Dudi
|
|
|
|
|
A lot of the code you need to do this can be found in my article PrintingTricksAndTips[^].
You will need to add the bitmap loading code from resources and convert it to a DIB in your OnBeginPrinting() and destroy it in your OnEndPrintig(). And StretchDIBBits() it in your OnPrint().
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
Has anyone noticed that the selecting values with a mouse from the Windows slider control is quite awkward?
In my opinion Microsoft implemented the right click action wrong. For example, if you have a slider control with 5 values and the ticks are marked 1,2,3,4,5, if the slider is currently at tick number 1 and you click on the "4" you would expect the slider thumb directly move to 4, right? Well, what happens is that it moves to "2". This is because it interprets the click as a "page down" command. While this is appropiate for a scrollbar, it certainly is not the right action for a slider. Look at any other non Microsoft slider control(for instance the volumn control in WinAmp) - the thumb moves directly where you have clicked behave in the correct way.
|
|
|
|