|
Can anybody help me how to convert MFC DLL to ATL DLL?
Srinu
|
|
|
|
|
|
I have 3 MFC DLLs(YSUTIL.DLL, YSWEB.DLL and YSCOMMON.DLL) which we cannot change and one more DLL YSWEB_STCNTY.DLL this we need to convert into ATL. YSWEB_STCNY uses some classes of above mentioned MFC DLLs.
Srinu
|
|
|
|
|
If it's an MFC extension DLL, then you can't - that type of DLL only works with an MFC app.
Otherwise, you'll need to change the global CWinApp object to a CComModule and initialize it appropriately. You can create a dummy ATL DLL project and copy the init code into your DLL's code.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
We are using STLPort 4.62 in previous version of our program.
All was work perfectly (set, map).
In the stl_user_config.h uncommented
# define _STLP_NO_OWN_IOSTREAMS 1
In a next version I try to use vector.
And...
#include <vector>
cause several errors:
c:\program files\microsoft visual studio\vc98\stl\stlport\ios.h(41) : error C2874: using-declaration causes a multiple declaration of 'ios'
c:\program files\microsoft visual studio\vc98\include\ios.h(106) : see declaration of 'ios'
etc.
Help to me, please, resolve this problem.
Victor_jv
|
|
|
|
|
Victor_jv wrote: c:\program files\microsoft visual studio\vc98\stl\stlport\ios.h(41) : error C2874: using-declaration causes a multiple declaration of 'ios'
c:\program files\microsoft visual studio\vc98\include\ios.h(106) : see declaration of 'ios' etc.
You #include iostreams from both, VC++ and STLPort. Probably a configuration problem. You need to study the STLPort documentation or ask in a STLPort forum.
|
|
|
|
|
Roland is correct. I use MSVC6 - I would check "Tools->Options..." then select the "Directories" tab. Make sure the path to STL port is higher in the list then the path to MSVCs STL implementation.
Steve
|
|
|
|
|
Since you didn't post your code, I'm not sure if you're using the standard C++ headers.
Try to avoid using non-standard headers, like <iostream.h> and <vector.h>.
Use the standard extensionless headers that are part of the C++ standard, like <iostream> and <vector>
The *.h versions are not portable, and not part of the official C++ standard.
Top ten member of C++ Expert Exchange.
http://www.experts-exchange.com/Cplusplus
|
|
|
|
|
Hi There
Im having problems replacing an ATL DLL in a project at the moment, lets call this DLL_A. I need to replace a DLL with a DLL_A to get info needed for a bug. The application installs and the DLLs are registered and the program runs fine. If I close down the APP, unregister the DLL and then change the DLL with DLL_A, register that with DLL_A and then Run the program, a sort of undefined behaviour happens. The DLL seems to load but It just crashes. The DLL definatly works but The application doesnt like me altering the DLL for some reason.
Even If I try and unregister DLL_A replace it with the original DLL and register that, the program still doesnt like it and I have to do a build or install all over again.
the CLSID is be the same for both and Im registering and unregistering correctly.
Is there something Im missing or extra that I need to do.
All help appreciated.
Karl
|
|
|
|
|
If all the GUIDS are the same and you've registered it all should be fine (assuming the replacment isn't cactus). Have you got details on the crash? Perhaps this will give someone a clue.
Steve
|
|
|
|
|
Hi all
What sort of control is YPagerMyStatus in Yahoo Messenger. I want to find the user's yahoo id. how can I do it. I didnt know what sort of control is it so i used WM_GETTEXT with no success
Any Suggestions?
Thanx
|
|
|
|
|
_Sanjay_ wrote: t sort of control is YPagerMyStatus in Yahoo Messenger. I want to find the user's yahoo id
its seems it Owner Created Control, where might be WM_GETTEXT message has been blocked!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Folks,
I have been able to create a Windows Service (aka NT Service) using C# with the help of an article posted by Mahesh Chand on c-sharpcorner.
I need to create an NT Service using C++ in Visual Studio .Net. Use of ATL and MFC is OK for my application. I did not find any article/ book chapter that addresses this. I know doing so in Visual C++ Studio 6 is fairly straight forward. Unfortunately, going back to Studio 6 is a not a desirable option.
In .Net Studio, I have created both kinds of Windows Service C++ ATL Projects: (a) Attributed (default) and (b) non-attributed. Fom these projects, I am not able to figure out: (1) how to install/ uninstall the created service and (2) where to put in the business code of the Windows Service.
If any body has done it and can share tips/ code/ steps to accomplish this, I will appreciate it. You may write to me at rgoyal@esri.com.
Thanks,
Roop Goyal
|
|
|
|
|
hello,
i write a atl com,and use the popup menu,and the menu can show rightly,and i add the menu command function,but when i click one menu item,the function does not run ,what is the matter?
i add the menu in the oncontextmenu,who can help me?
where can i upload my code?
thanks.
|
|
|
|
|
|
Obviously, it's a .com
--
Pictures[^] from my Japan trip.
|
|
|
|
|
|
Hi,
I am have some problems calling a DLL in embedded Pocket PC. The CoCreateInstance reply a error "Class not registered."
I have already register the DLL in the Pocket PC device and even in the emulator but I still keep getting the same error.
I have a running version for desktop but the same is having problems on embedded. In debug mode, I found that the DLLMain's parameter dwReason is = DLL_PROCESS_DETACH.
Can someone please help me?
Thanks in advance.
|
|
|
|
|
|
|
Separate compilation of templates has only recently been added to the standard. I haven't looked to see if this feature is present in VC>6 but I doubt it. If it did it would look like this:
<br />
template <class T> void foo(T);<br />
<br />
export template <class T> void foo(T t) { foobar(t); }<br />
Steve
|
|
|
|
|
export has turned out to be a failure.
And MS doesn't plan on supporting it anytime soon.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
You cannot truly appreciate Dilbert unless you've read it in the original Klingon.
|
|
|
|
|
I thought you were asking a question but looking back at the posts it looks like you were answering a question that was deleted which kind of "orphaned" your entry (thus making me think you were asking a question).
I'm not sure what you mean when you say "export has turned out to be a failure". There are compilers that support it although not many. Microsoft has always been slow (very, very slow) when it comes to standards compliance in its C++ compilers.
Steve
|
|
|
|
|
Stephen Hewitt wrote: I'm not sure what you mean when you say "export has turned out to be a failure".
I was reading up on export a while back, so my info may be out-of-date, but the group who does the compiling engine for Comeau took something like one man-year just to implement export . That was the same amount of time they needed to implement a compiler for the entire Java language. Plus, export turns out not to actally solve the problem in some cases.
I can't reveal my discussion w/the C++ compiler guys (it was at the MVP Summit and NDA'd) but their lack of support for export has nothing to do with being slow to conform to standards. Take a look at the previous paragraph and you can figure it out.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
You cannot stop me with paramecium alone!
|
|
|
|
|
I have read article "Making ATL OLE DB Provider templates support updating of data" at www.codeproject.com. Through reading your article, you must be a professional in "OLE DB Provider" field, I think so. Now, would you like to give me some help about this issue? You will be pretty appreciated.
1. In the file "IRowsetChangImpl.h" of your "Simple Data Object with update support", there is a row of code "HRESULT hr = pT->GetDataHelper(hAccessor, pColInfo, (void**)&pBinding, pDstData, cCols, spConvert, pRow);"(lies in method "SetDataHelper"). But there is not definition and implementation of "GetDataHelper". How to resolve it?
2. Now, I'm building up a updatable OLE DB Provider. This provider will be run in MS SQLServer DTS. First "Transform Data Task" of MS SQLServer DTS get the rowset from SQLServer, then call this provider, and pass rowset data to my provider by calling IRowsetChange::SetData(HROW hRow, HACCESSOR hAccessor, void* pSrcData). My questions are as following:
1) "Transform Data Task" pass the new data(a row of data include 10 columns) to my provider through method "SetData(HROW hRow, HACCESSOR hAccessor, void* pSrcData)". Is it correct?
2) I have get the DBBINDING info by the next code:
STDMETHOD (SetData)(HROW hRow, HACCESSOR hAccessor, void* pSrcData)
{
DBACCESSORFLAGS *pdwAccessorFlags;
DBCOUNTITEM *pcBindings;
DBBINDING **prgBindings;
DBBINDING *pBindings;
pdwAccessorFlags = (DBACCESSORFLAGS *)::calloc(1, sizeof(DBACCESSORFLAGS));
pcBindings = (DBCOUNTITEM *)::calloc(1, sizeof(DBCOUNTITEM));
pBindings = (DBBINDING *)::calloc(1, sizeof(DBBINDING));
prgBindings = &pBindings;
HRESULT hr = this->GetBindings(hAccessor, pdwAccessorFlags, pcBindings, prgBindings);
return S_OK;
}
Now, how can I extract data from pSrcData? I'm puzzled.
Expect for your reply!
Thanks in advance!
|
|
|
|