|
|
Hi all..
I dont have knowledge on Com...I no Basic Mfc..
I want to study COM..Any good site...where i can study..
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
Hi Manju,
I strongly recommend that you should learn (or at least begin learning) a technology by reading books. There may be several great articles over the internet, but reading a book is more important and will do you more good. At least that was my experience. Ask people over here to suggest you a good beginners book and I'm sure they will suggest you the best ones.
I'll recommend Beginning MFC COM Programming by Julian Templeman.
CodeProject has a dedicated article section for COM and COM+[^] as well.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
HI sir.
Thank you for ur suggestion..
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
|
|
Have also a look to Jeff Glatt's wonderful article series, namely COM in plain C , starting here [^].
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
|
|
|
|
|
I learned a lot from this book, back when COM was a mystical beast: Essential COM[^]
And the follow up book: Effective COM[^]
Sorry to throw more books at you, I know you were looking for a website...
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
|
My advice is to stay away from COM. It's poorly designed, unnecessarily complex, hard to use, and old technology.
.NET is a more modern technology and will be around longer. .NET is easier to use; many tasks in .NET can be done by just invoking a method in a class. To do the equivalent in COM requires writing code that looks like hieroglyphics.
COM is the framework equivalent of Vista.
|
|
|
|
|
I am trying to find out whats the problem with my application when running in debug and release modes. The same code in another application (similar application) doesnt produce the following behavior. In debug mode everything is fine. The situation is, I am initializing an array while starting the application (for example as follows)-
<br />
norm_radius = sqrt(xpos * xpos + ypos * ypos) / constant;<br />
norm_radius_2 = pow(norm_radius, 2.0);<br />
...<br />
sin_angle = sin(angle); cos_angle = cos(angle);<br />
sin_2angle = sin(2 * angle); cos_2angle = cos(2 * angle);<br />
...<br />
data[0] = 0.0;<br />
data[1] = 2 * norm_radius * sin_angle;<br />
data[2] = 2 * norm_radius * cos_angle;<br />
<br />
data[3] = sqrt_6 * norm_radius_2 * sin_2angle;<br />
data[4] = sqrt_3 * (2 * norm_radius_2 - 1);<br />
data[5] = sqrt_6 * norm_radius_2 * cos_2angle;
noting complicated, just simple assignments with some arithmetic functions. But when I run it in release mode, the data is not the same as it is in debug mode (which is the correct one). BTW the above code is in a function which I call form another function while starting the application.
Any ideas/suggestions for why this is happening??
-thanks
PKNT
|
|
|
|
|
Can you show more code? What is data ? If it's an array how big is it? Are you exceeding its capacity?
Steve
|
|
|
|
|
I can show the full code of this function tomm. data is just an array of 65 double elements. These initializations are done in two nested for loops nested. I think if I am exceeding its capacity at least the first elements should be correct, am I right?? I am still why its different between debug and release modes. Actually I am using the same code in another application and it works fine. To say the file in which this code/function is defined is the same in both applications.
-thanks
PKNT
|
|
|
|
|
Please post compilable code snippet and array declaration. I hope you've enabled project settings to debug in release mode or else the compiler will show bogus values.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
I can show you the full code of this function tomorrow. Actually I am checking the values by writing the values into a text file in both modes.
-thanks
PKNT
|
|
|
|
|
You've initialized data , but have you initialized other variables like sqrt_x ?
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Ofcourse I did, orelse, how can I get correct result while executing the the debug version of the application ??
PKNT
|
|
|
|
|
|
thanks for the link. I did exactly what he said under section "Making Debug Mode more like Release Mode" and it did the trick and now its works fine.
PKNT
|
|
|
|
|
In my experience differences in Debug and Release mode occurs when there a bug in the program, typically pointer related. Most likely some other part of your program is over writing the "data" array. One way to quickly handle such problmes is to selectively comment code and find out which section of code is creating problem.
-Saurabh
|
|
|
|
|
I'm updating an old (32bit) command line C++ program that I used to detect specific human input devices connected to the USB port.
the includes for this project are:
extern "C"
{
#include "hidsdi.h"
#include "hidusage.h"
#include "hidpi.h"
}
the project compiles without linking error as a 32bit application.
However, as soon as I switch to 64bit I get linker errors such as:
Error 1 error LNK2019: unresolved external symbol HidD_FreePreparsedData referenced in function "public: __cdecl DgCpDfuFunctions::~DgCpDfuFunctions(void)" (??1DgCpDfuFunctions@@QEAA@XZ) DgCpDfuFunctions.obj
Error 2 error LNK2019: unresolved external symbol __imp_SetupDiDestroyDeviceInfoList referenced in function "private: int __cdecl DgCpDfuFunctions::FindControlPanel(struct _hidDeviceStruct *)" (?FindControlPanel@DgCpDfuFunctions@@AEAAHPEAU_hidDeviceStruct@@@Z) DgCpDfuFunctions.obj
Error 3 error LNK2019: unresolved external symbol __imp_SetupDiGetDeviceInterfaceDetailA referenced in function "private: int __cdecl DgCpDfuFunctions::FindControlPanel(struct _hidDeviceStruct *)" (?FindControlPanel@DgCpDfuFunctions@@AEAAHPEAU_hidDeviceStruct@@@Z) DgCpDfuFunctions.obj
Error 4 error LNK2019: unresolved external symbol __imp_SetupDiEnumDeviceInterfaces referenced in function "private: int __cdecl DgCpDfuFunctions::FindControlPanel(struct _hidDeviceStruct *)" (?FindControlPanel@DgCpDfuFunctions@@AEAAHPEAU_hidDeviceStruct@@@Z) DgCpDfuFunctions.obj
I made sure that the 64bit "project properties" -> "Linker" -> "Input" are set up exactly like the 32bit project.
Note: I'm using the libraries from the Windows DDK, i.e. \lib\wxp\i386\hid.lib
EDIT: I'm using Visual Studio 2005
modified on Wednesday, June 18, 2008 1:43 PM
|
|
|
|
|
abiemann wrote: Note: I'm using the libraries from the Windows DDK, i.e. \lib\wxp\i386\hid.lib
I am not sure about the problem but it seems that you are linking with 32-bit version of the library. Do you have a folder with x64 or IA64 in the lib folder.
-Saurabh
|
|
|
|
|
I tried the IA64 folder... but then I see this error:
hid.lib(HID.DLL) : fatal error LNK1112: module machine type 'IA64' conflicts with target machine type 'x64'
NOTE:
this is my x64 debug configuration (preprocessor)
_DEBUG
WIN64
_CONSOLE
WINVER=0x0501
_CRT_SECURE_NO_WARNINGS
_CRT_SECURE_NO_DEPRECATE
modified on Wednesday, June 18, 2008 6:37 PM
|
|
|
|
|
IA64 is Itanium. x64 is AMD64 (and EM64T - Intel's implementation of AMD64).
The target market for Itanium is tiny because Itanium was a colossal failure. If you use a processor like an Athlon, Opteron, Xeon, Core 2, Core i7 and so on, it will be using x64 (AMD64/EM64T). If you buy 64bit Windows (such as XP 64 bit or Vista 64 bit) it will be x64.
You can't use IA64 on an x64 platform, so you need the x64 (probably labelled AMD64) versions of these libs, not the IA64 ones, which is exactly what the first error says.
I can't find these either (I only have x86 no matter what I try to install) so if you find/have found these 2 libs, please let me know
Never mind, found it.
modified on Wednesday, December 3, 2008 7:12 PM
|
|
|
|
|
Hello community,
i try to debug a little project downloaded here from codeproject and if i want to start them i recive this message:
Debugging information for "explorer.exe" cannot be found or does not match.
and i cannot set any breakpoints!
Can someone help me here to solve this, are there any settings to set?!
Thanks for any help!
termal
|
|
|
|