|
Hi.
I want to use WMI functions in a managed C++ project. I have found these functions and classes are defined in the wbemdisp.tlb, but I have not managed to include this library in my class.
In VB.NET I just had to add a reference to the library, so I ought to be possible in C++ as well, but how?
Best regards
/EnkelIk
|
|
|
|
|
See System::Management namespace. It wraps WMI.
43 68 65 65 72 73 2c
4d 69 63 68 61 65 6c
|
|
|
|
|
Hi.
I have created an application starting with a "Managed C++ empty project". Now I would want the users to be able to run this project from a local server and therefore need their .NET frameworks to trust the application.
How do I make my project an assembly? I tried just adding an AssemblyInfo.cpp file to my project and generating a keyfile, but that did of course not do the trick. Using the Microsoft .NET framework wizard, it does not recognize the *.exe as an Assembly. What more do I need to do?
Regards
/EnkelIk
|
|
|
|
|
I just realized that even if I create a Managed C++ Application project and get the AssemblyInfo file automatically generated I still get the error "Unable to load assembly ....." when I try to set "Trust an assembly" in the .net wizards. If I try with a dll though everything works fine.
What am I doing wrong? The only thing I did after having created the Managed C++ application as well as the Managed C++ class library was to compile them. I've tried adding a strong name key but that did not help.
All help will, as always, be greatly appreciated.
/EnkelIk
|
|
|
|
|
how to creat a setup project that will install an application through a wizerd ?
how to creat DNS programatically (driver name that we manually make in DB projects)?
how to logoff and login programatically ?
r00d0034@yahoo.com
|
|
|
|
|
There are some companies that provides such programs.But i don't know how and where they can be found.
|
|
|
|
|
Hi Guys,
How can I add STL lib in MC++?
Thanks
|
|
|
|
|
You just include the header files and use it as if you were writing a standard C++ application. There's nothing special about it.
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
Hi.
I'm using a TextBox to display status messages to the user (like:
"Retrieving MAC address: 002345235cbd"
"Retrieving IP-number: 10.10.10.10"
and so on). The messages are added line by line so that the first message is never over written. The only way I have found to be able to control when to get a new line is to use a String array and the set_Lines method, since neither \n, \v or \f has the desired effect. Is there no better way?
The main problem using the TextBox->set_Lines method is that all the lines are set at the same time so I can't have different fontstyle on different lines.
Anyone has a solution? Or should I use something else than TextBox to display the messages? If so what?
Regards
/EnkelIk
|
|
|
|
|
Environment.NewLine is the .NET friendly way to make something multiline, and make sure the text control is set to multiline also.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Yes, I can't find a better way than using strings and then doing something like:
String* break="\r\n";
String::Concat(textString1,break,textString2);
This is obviously a lousy solution because you have to put all of your strings together before you even display them!
MS says that we shouldn't even be using strings anymore if they have to be manipulated repeatedly, but should use stringBuilder instead. Unfortunately, stringBuilder has been proven in clinical trials to cause insanity in 3 out of 5 users.
|
|
|
|
|
this line of code
IFormatter formatter = new BinaryFormatter();Stream stream = new FileStream("MyFile.bin", FileMode.Create, FileAccess.Write, FileShare.None);formatter.Serialize(stream, obj);stream.Close();
alwas write data at the end of file or not ?
i mean there are alot of Objects .
where it write in the file?
this line of code
object obj = formatter.Deserialize(stream);
alwas read data from the begining of file or not ?
i mean there are alot of Objects.
where it read from the file?
r00d0034@yahoo.com
|
|
|
|
|
HOW to creat FileStream object that coud write into a file ?
can you explain any of its constructor?
how to write data using FileStream into a file or read theobject from a file to the FileStream object only then it is possible to serialize or Deserialize it?
i want to write a hastable object into a file that contain class objects,and class objects further contain hashtable and other class objects.
may i write that hashtable into a file and retrive again?
i study the api but could not understand what methods to use.
r00d0034@yahoo.com
|
|
|
|
|
if i have a class like
public __gc class{
String *str;
int a ;
}
i want to right its object into file.after that i want to send it to different computer through network and again want to read it again if i have the same class there may i read it into that class object.
is it possible ?
can any body write the syntex of reading and writing the object ito a file ?
r00d0034@yahoo.com
|
|
|
|
|
i want to write its object into a file and send that file through a network to different computer and i want to recive that object again if i have the same class there.
may i read the same object on network from a file?
any body can explain my idea into code like
how to write object into file ?
how to read object on the network (having same class there) from file ?
r00d0034@yahoo.com
|
|
|
|
|
I n how many forums are you going to ask this!
Learn one thing: C++ questions belongs to the Visual C++ forum!!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
i think there is a class in dot net also and object are also created in csharp?
i think thats a language independent question.
r00d0034@yahoo.com
|
|
|
|
|
how to use OutputDebugString in managed code?
r00d0034@yahoo.com
|
|
|
|
|
From Managed C++ you can include windows.h and then just call the function as you normally would.
This will make use of the "IJW" or "it just works" interoperability feature of Managed C++.
The following page has additional information on this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmxspec/html/vcmg_PlatformInvocationServices.asp
Hope this helps!
Tarek Madkour & Mark Lacey
Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
i want to show a string in vs.net debug output window.
i think i can use Trace or Debug class. but i dont now how to use them to display a string in managed code ?
if there exist some other way plz tell?
i want to see the execution and flow of my program
can any bode tell?
plz write the complete syntex i will be very thank full to u.
r00d0034@yahoo.com
|
|
|
|
|
in the console window ? or the output window ?
something like :
<br />
using namespace System::Diagnostics;<br />
...<br />
<br />
Console::WriteLine(S"XmlNodeType::Element : {0}", reader->Name );<br />
<br />
Debug::WriteLine(S"XmlNodeType::Element : {0}", reader->Name );<br />
Max.
|
|
|
|
|
I am new of the term so Managed Extensions C++ (MC++) is new to me. I'd like to know of about, any others details welcome.
Thank you
|
|
|
|
|
Image C++ stripped of all power so it fits into the .NET world. MC++. Basically it's C++ without the cool stuff, but with the .NET framework libraries, and compiled to MSIL, so it is interoperable with C#, etc. Useful to pull legacy code into the .NET world, but otherwise a waste of time IMO.
If you're new, you should stay away from ALL M$ specific constructs and learn C++ before you think about windows, dialogs, MFC, etc.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
I'm looking for a good book that covers the windows commands and controls. The on line help is all great as a function reference manual, but doesn't help the novice (me) figure out which commands to use when. I'm looking for something to get me started writing C programs that will open and close applications, run from a hidden window, create a task manager, etc.
Can anyone recommend a good book, or web sight to start with?
squeaky
|
|
|
|
|
on microsoft press, look for "Visual C++.net step by step" by Templeman and Olsen, quite a nice book.
maybe not have all of the more advanced features you're looking for, but it's a nice start.
Max.
|
|
|
|