|
This question is no where related to CLI and you have already asked it in VC++[^] forum. So dont cross-post and choose correct forum.
|
|
|
|
|
Hi,
A long long time ago in a compiler far far beyond now, VS2005 without sp1 ... -_-, i've developed a project using native C++ and a lame shell interface, now i thought it could be fun converting the project to a C++/CLI DLL with a managed wrapper class for the main functionality normally controlled by the old shell input and an interface developed in C#, this all works great, however as soon as i switch my executable to dll build, i get a fatal error in the interface telling me he cant load the assembly updater3 wich is my managed dll. I probably thought this would be because the lack of a AssemblyInfo file, however creating a new dll, ripping the assemblyinfo and editing it doesnt help a bit.
Is there someone who can tell me wich rules apply when converting a native application to a managed dll
Thanks already!
|
|
|
|
|
|
Hi.
How could I flush the input buffer in C++/CLI? (in a Console Application of course):->.
Like fflush(stdin) does in C.
Thank you.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
Demian Panello wrote: Like fflush(stdin) does in C.
What about using System::IO::FileStream::Flush() ?
|
|
|
|
|
Thank you Prasad.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
Hello,
i want to use a Lib in a C# Projekt. Therefore i want to reconfig the Lib-Project (all sources) into a dll Project.
new Settings:
Configuration Typt: Dynamic Library (.dll)
Common Language Runtime support: Common Language Runtime Support (/clr)
For Debug:
Enable C++ Exceptions: No
Runtime Library: Multi-threaded Debug DLL (/MDd)
After this i wand to compile the Project and get a D8045 Error.
-------------------
Only C++ source code files can be passed to a compilation that uses /clr. Use /TP to compile a .c file as a .cpp file; see /Tc, /Tp, /TC, /TP (Specify Source File Type) for more information.
-------------------
one source-File is a c-File.
does that run at all ore have i find another solution?
|
|
|
|
|
Did you follow the instructions in the error message?
Use /TP to compile a .c file as a .cpp file; see /Tc, /Tp, /TC, /TP (Specify Source File Type) for more information.
led mike
|
|
|
|
|
Hi all,
Iam working on Pointers. How would I pass this memory location as an argument to a function?
ie.,
#define REG (*((volatile unsigned long *) 0x3FFFC00E))
this is my function
void funcTest( unsigned long reg, char value)<br />
{<br />
reg= value;<br />
}<br />
I need to pass the "REG" as an argument so that I write the "value" to that particular memory location or the register.
|
|
|
|
|
I'm not sure what you are trying to do...
REG dereferences the pointer so it becomes the unsigned long stored at address 0x3FFFC00E.
You need a reference or pointer to an object passed to a funtion if you want to modify the object
in the function:
Then in your func you assign a char to an unsigned long??
Whatcha tryin to do?
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Looks to me like you're in the wrong forum, this doesn't look like a .NET C++ question. Try the Visual C++ forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If I have a C# only application I could ship my application without worrying about the target platform.
However if I have a Managed C++ DLL I should, it seems, provide a 32bits installer and a 64bits installer.
Right now I'm considering ship 2 version of the ManagedC++ DLL with a C# wrapper which call into the appropriate one depending of the platform.
But this a lot of work to create this wrapper.
Particularly as I declare some managed struct in the Managed C++ library which I pass around.
Is there any better and quicker way to be platform independant?
One of the problem we face is we create installer for affiliates.
All the installer together are quite big.
If I should now double the size because of 32bits/64bits consideration that becomes daunting...
-- moved at 21:21 Tuesday 20th March, 2007
|
|
|
|
|
Super Lloyd wrote:
Is there any better and quicker way to be platform independant?
I'd just stick to both...
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
|
Please ask in the VC++ forum. This one's for C++/CLI related stuff.
|
|
|
|
|
dear programmers,i have started my first programming experience with C++,
and i have read the DEITEL c++ book,i want to know,what should i do now?
should i continue with the MFC or C#.net 2005?thanks
khodadad pakdaman
pakdaman@cleanmail.it
|
|
|
|
|
You should probably ask your questions in the right forum, this one is for neither C++, nor C#, but for C++/CLI.
It depends what you want to do. C# is probably a more likely choice.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: It depends what you want to do. C# is probably a more likely choice.
Definitely the appropriate path after finishing the book on C++
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Easier to use, better library support, more support online, I'd say it's a more likely choice for someone starting to program windows.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I know I was entertained by the response after the original post.
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Hi,
I'm running a team where our .net development is going to need to integrate with some commercial software with C++ APIs. I've identified Managed C++ as the implementation mechanism for integrating the technologies and we have a couple of prototypes working...
.. however, I've managed to convince the Project Manager that we should have a couple of reference books available for the team.
Can anyone recommend any MC++ books, specifically Visual Studio 2005?
Regards,
Ray
|
|
|
|
|
Ray,
Unfortunately, there aren't many books available. However, I have found the following useful:
C++/CLI
The Visual C++ Language for .NET
Gordon Hogenson, Apress
ISBN-13:978-1-59059-705-7
ISBN-10:59059-705-2
This deals mostly with the C++/CLI language. The same author will have the following available in April, 2007:
Expert Visual C++/CLI, Apress
Also,
Pro Visual C++/CLI and the .NET 2.0 Platform
Stephen G. Fraser. Apress
seems to be more for beginners than the aforementioned.
Also,
C++/CLI in Action
Nishant Sivakumar, Manning
ISBN: 1-932394-81-8
will be released in April, 2007 also. This book is written by one of our great contributors here at the Code Project.
Geo.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi,
I have a question regarding C++/CLI and classes. I can declare a managed class like this:
#pragma managed<br />
public ref class A<br />
{<br />
public:<br />
void DoSomething();<br />
};
The compiler will translate this one into MSIL or CIL. And I can use this class in any .Net language by adding my compiled dll/exe as a reference e.g. in a C# project.
And here's the unmanaged pendant:
#pragma unmanaged<br />
class B<br />
{<br />
public:<br />
void DoSomething();<br />
};
This is code gets translated into native code.
But what happens, if I have the following:
#pragma managed<br />
class C<br />
{<br />
public:<br />
void DoSomething();<br />
};
What does the compiler exactly with this code? I'm confused
|
|
|
|
|
class C gets compiled to MSIL. Check it out in the disassembler
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Hi Marc, thank you for the information. Well, I used Reflector.Net and didn't see these "hyrid" classes. But how is it possible that e.g. the managed class C could inherit from native class B?
And if I call call a native function in class C, does it use internally PInvoke to call it? So, is it basically faster to call managed functions/methods from class C than calling native functions?
|
|
|
|