|
I recompiled the sources ot the library instead of using the published DLL, and now it works! For some reason, VS2005 doesn't like the DLL made by VS2003... so, it's not an issue of using C# controls in C++ (maybe this topic can be removed from here, I also posted in the article's comments)
|
|
|
|
|
The difference between both is:
VS2003 uses the .NET Runtime version 1.1, whereas VS2005 uses the .NET Runtime version 2.0.
Its not exactly 100% compatible. But, as you noticed, adapting and recompiling will work most of the times. I daresay, you will get 99% of all .NET assemblies to compile with no or minor adjustements.
OK, maybe more like 90%.
75 to 90.
50ish.
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
I want to add desktop node in treeview and further want to add the My Computer , Recycle Bin , My Documents etc in the Desktop node .For that I think SHGETDESKTOPFOLDER function should be used. I searched it's implementation in online MSDN . But no help given.
Please help me.
Thank You.
Pankaj Garg
|
|
|
|
|
hi,
When i try to build the VC++6.O workspace in VC++.NET environment iam getting the following linker error
LNK1104 : "Cannot open file msvcirt.lib"
I have tried in the NODefault option also. It didn't worked out.
Please help me in this context.
Thanks and regargds,
LaksshmiNarasiman
|
|
|
|
|
the error is explicit enough i find :
you are calling some functions in your progam than are located in msvcirt.dll, but the compiler needs the .lib to link to the functions. verify in the project settings the lib path...
|
|
|
|
|
As of my knowlegdge msvcirt.dll belongs to VC++ or microsoft library. But i don't know the path for the msvcirt.lib. I searched completely in .NET installation folder. But i couldn't able to locate.
I reckon the same linker error is posted by some body in some websites. Still they are also waiting for a solution.
I have converted many projects from VC++ to VC++.net solution. Only iam facing the problem in a particular workspace.
The project is a Multhreaded Dll which includes 2 libraries.
Please let me know if you can able to fix this problem.
Advance thanks and regards,
LaksshmiNarasiman
|
|
|
|
|
I have a simple application in VC6.0 and ported it to .NET 2003.
I set "Use Managed Extensions" to Yes from the Project Properties->Configuration Properties->General because am using #using <mscorlib.dll>.
i get the foll error
Command line error D2016 : '/RTC1' and '/clr:initialappdomain' command-line
options are incompatible
i saw a lot of articles on this which suggested to do the foll to solve this error: i.e.
Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
Click the C/C++ folder.
Click the Code Generation property page.
Modify one or both of the following properties: Basic Runtime Checks or Smaller Type Check
i tried changing options under Basic Runtime Checks but to no avail?
i still get the error?
How can I solve this command line error?
Pls help!
Sincerely
Giftsana
|
|
|
|
|
I do have following structure in VC++
struct Employee
{
int a;
char b;
float c;
};
i need to obtain the size of the above struct.
While using sizeof operator will it return the byte size(in this case 9) or padding will also be taken into account.
if so how the size can be obtained without padding
Thanks
sanggetha
|
|
|
|
|
The Almighty MSDN says:
"When the sizeof operator is applied to a class, struct, or union type, the result is the number of bytes in an object of that type, plus any padding added to align members on word boundaries."
If I am not wrong sizeof should return in your case:
10 bytes, because a word is 2 byte. But it might be even more, depending on your system and how the padding is done.
int = 4 bytes
char = 1 byte
float = 4 bytes
total = 9 bytes + padding to word boundaries (1 byte here)
Tobias
|
|
|
|
|
it returns the size that the class/structure actually occupies in memory.
it can take 9 bytes (as you say) in minimum on a 32 bits machine ( (int = 4) + (char = 1) + (float = 4) ), but on a 64 bits system, your int will be 8 bits wide.
moreover, the compiler aligns the members on the larger member.... so, don't expect your struct to be 9 bytes wide.
|
|
|
|
|
I really really need help with tracking the mouse in a simple image program i am writing, any help will be greatly appresciated.
I have writen the program to load an image, and display its dimensions, which it does.
I now need to get it to alter the pixel values within a selection, i cant get the selection to display or select.please help
Be good...if you can't be good....be good at it!
|
|
|
|
|
how do you make a shared function?
In VB.NET I'd have done like this:
Public Shared Function f() As Integer
Think it's something like this:
public:<br />
int f()
but how do you make it shared?
|
|
|
|
|
As far as I know is the Shared keyword the equivalent to C#'s static keyword. Furthermore please note that the static keyword in VB is different to C#'s or C++/C one. However, static should be the way to go.
Tobias
|
|
|
|
|
|
Hello everybody,
I have two classes, one in c# and one in c++. The c# class is derived from the c++ class. Now I want to create a new virtual member function. No problem. But the function should return a double value in an parameter.
I use VS2005.
c#
public override Status GetProgress (ref System.Double dVal)
{
...
}
What's the equivalent of the base class in c++ ?
virtual Status GetProgress (System::Double ^dVal) is wrong.
Does anybody know the solution?
|
|
|
|
|
Probably you're looking for a "tracking reference %".
As far as i know it should be in your case :
virtual Status GetProgress (System::Double^% dVal)
On the other hand an interior pointer might suit as well;
virtual Status GetProgress (interior_ptr<System::Double> dVal)
Tobias
|
|
|
|
|
Hi Tobias,
thank you for the quick reply.
Using "System::Double^% dVal", I'm still getting an error message: no suitable method found to override. But "interior_ptr<system::double> dVal" works.
Now I'm checking, what it means...
Thanks!!
Hermann
|
|
|
|
|
// Assuming Status is a ref class
virtual Status^ GetProgress(System::Double% dVal) override
{
}
|
|
|
|
|
Hi George,
Thanks a lot! It works! Since I know it's a tracking reference, I found the description in the online help. Now I realized the meaning
Hermann
|
|
|
|
|
how to create an algorithm?
|
|
|
|
|
Simple,
int algorithm (int i) { return i; }
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
this is not exactly an algorithm, as it refers to a programming language...
but as the question was a bit stupid, i second you in your answer
|
|
|
|
|
your question doesn't mean anything.
take in consideration this :
what do you want to achieve ?
what main steps do you have to go through ?
what technologies will you use ?
|
|
|
|
|
>your question doesn't mean anything.
If your a programmer it should!
An algorithm is just a list of
instructions detailing how to
do something. Could be making
a peanut butter and jelly
sandwich.
|
|
|
|
|
man, i know what an algorithm is
but still the question didn't mean anything...
what sort of algorithm was want ?
printing ?
3D rendering ?
Arccosine calculation ?
-- modified at 10:52 Tuesday 21st March, 2006
|
|
|
|