I am a c# programmer and I am trying to reference a DLL wriiten in c++. I receive an error stating that it is not a valid assembly or COM component. I also have the source code, so I am attempting to compile it in Visual Studio 2005. It was originally compiled in Visual c++ 6 I believe. It is my understanding that if I can complie the DLL in the new framework, I can then reference the DLL in c#.
So, when I attempt the compilation I get a number of errors which I am hoping can be solved.
<b>Error c2011 'struct' type redefinition. </b>
This error is in an .h file which has a message at the top:
Machine generated IDispatch wrapper class(es) created with ClassWizard
This errors occurs in a line
<code>class Font : public COleDispatchDriver
COleDispatchDriver is a class in a .h file which states
that this is a part of the MFC Classes c++ library.
<b>Error c4430 missing type specifier - int assumed </b>
This error is on a line which calls a routine called debugEMF()
If I goto this routine it is
CEnhancedMetaFile is a class
Pls forgive me: I have no idea about c++.
Anyone help pls?
DDBs are perhaps going to perform better because they are matched to the device, a DIB has it's own bit depth. Windows is also geared more towards DDBs, although personally I prefer to use DIBSections as they give me access to the underlying bits as well
The trouble with using OpenGL or DirectX is that you need them installed first. DX is a safer bet. Obviously, these frameworks exist because doing 3D with straight GDI or GDI+ is not very performant.
DirectX would be my pick for performance.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
I linked all as instruction and run in debug, but I see Nothing related to the tool, it looks that the tool doesn't exist:
No interface, no text, no god, no ghost, no ...
every thing is exactly the same as before.
what is that? have u used the tool in someway?
I think I should see something about the tool.
When the process exits, it'll dump the memory leak information to the debug stream. Since the output is formatted in such a way that Visual Studio understands, you can double click on the output, and the IDE will open the right file and put the cursor on the line on which the leak was detected.
The 1.0 version works very well. The coming 2.0 (dunno when it'll come, last time I talked to the author, he was bogged down with work), will detect lots more than just memory leaks. Interesting stuff.
Anyway, I use the 1.0 successfully at home, and is thinking about using it at work. If you're looking for a nonexpensive tool to find memory leaks, I really recommend VLD.
Oh by the way, you will need to recompile the library for later versions of Visual Studio than VC6. Otherwise it'll report nothing. Since it was written in VC6, it contains a great deal of code which is not standards compliant. If you'll mail me, I will reply with source code that compiles and works well with Visual Studio 2003.
No humans were probed in the making of this episode
// Handle device arrival
// treat lParam a pointer to a standard structure DEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)(m->LParam);
// check if an volume device arrival
if (lpdb->dbch_devicetype == DBT_DEVTYP_VOLUME)
I received error:
error C2440: 'type cast' : cannot convert from 'System::IntPtr' to 'PDEV_BROADCAST_HDR'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Is it possible to do message maps calls like post and peakmessage from a non-GUI (no window) application? I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle and as there is no window/UI (its a service) I am not sure how i can invoke these callback from the dll.
Are there any related sample code or articles that i can look at?
PS: I am not very experienced with mfc programming so please bare with my silly questions.