Hey i dont think ,i made my point clear to you.Actually this thing is completely new to me.Thats why i am unable to explain it corectly.
I have unmanaged c++ code.
But now in that i need to use some of the managed i.e C++/CLI code.
That is my main problem .
I tried to search solutions on internet but these solutions made me more confused.
One of the solution said , i should make dll of the managed code .Then i should make one wrapper to call the functions of the dll.Should i do that.
Can't i directly use the functions of dll in my c++ unmanged code like withe help of GetProcAddtress()
without any wrapper class.I am new to all this.
I'm afraid it is still not clear exactly what you are trying to do and why you need to mix managed and unmanaged code. I have already explained that you can use the functions of an unmanaged DLL in managed code by using the P/Invoke mechanism (link given in my previous answer). If that does not, or will not work, then you need to give an example of your code and explain what the problem is.
Okay , i will tell you.What is my problem.
Actually i need to use powershell apis , in my c++ code.As i need to find out the no .of servers in my appfabric cluster.
So the challenge was how to acess powershell in c++ code.
I had one c# code in which i was able to acess powershell properly.
It gives me every information i need to find out..Like wether the appfabric service is running or not.How many servers in cluster.All the info.
Now as my code is in c++ , my biggest challenge is using the c# script in c++,because that
scripts works wonder for me.
So to use that i converted whole of C# code into C++/CLI so that i can use it in my current unmanged c++ code.
Now the problem is adding that C++/CLI code into UNMANAGED CODE so that i can acess powershell in c++.
How to do that mixed mode programming?
I am looking for passing unsigned int* to managed C++ app
void func(unsigned int * data)
//Here I have access to managed C++ class and I would like to know how to pass data to this class
managedwrapper->managedFunc( need to pass data)
ref class ManagedWrapper
managedFunc(get the data here)
//how to get the data here.
Hello all, with
I am a socket programmer, and recently i'm learning MODBUS TCP, and I wanted to make a simple application using MODBUS TCP over ETHERNET, application has two programs, one is SERVER and other is CLIENT as we have in network programming, NOTE : Strictly on C only. I searched a lot and read but couldn't find anything except for C# .NET and serial configuration. If anyone can help...!!!?
Now I would like to redirect output of CMD, but there is following problem. When I set UseShellExecute=false, I cannot run CMD with administrator privileges, which is required to use Netsh. But when I set true I cannot redirect output. Could you please help, how can I solve this problem? Thank you in advance!