|
you can find some info in apress.pro c++/cli
http://www.flazx.com/ebook4985.php
|
|
|
|
|
sockets.com
led mike
|
|
|
|
|
Hi all.
Can i execute an maneged code from unmanaged??
I.e. suppose i have an COM interface with method:
STDMETHODIMP CMyClass::ExcecCSharpProgram()
{
IMyParams* pIface = this->m_pAnInterface;//I need to pass this pointer to executed program!!!
SomeHowExecCSharpProgram("MyProg.exe");//How i can to do this (exec my program)
SomeHowPassPointerToMyProg(pIface);//And this (pass interface pointer to executed program)
}
Please help, or point out where i can see any related topics.
THANK A LOT.
|
|
|
|
|
It would be easier to do what you want if you have some public classes in a C# assembly. You could mark them as COMVisible and then directly use them from your native code via CCW.
Alternatively, if your C++ app can use /clr compilation, you can directly consume the C# classes via C++/CLI.
Regards,
Nish
Fly on your way like an eagle
Fly as high as the sun
On your wings like an eagle
Fly and touch the sun
|
|
|
|
|
|
|
Please post your question to "SQL/ADO/ADO.NET" forum.
Best,
Jun
|
|
|
|
|
In a very long loop (up to 500.000), I have a String^ variable that takes long lengths (and different values) each loop cycle. I wonder if it's worthy to delete the variable at each loop cycle's end; if delete is not used, will the CLR take care of it ?
|
|
|
|
|
String is not IDisposable, so there's no point in calling delete. For another thing, you don't need to do that anyway, the GC will appropriately come into play as and when required.
Regards,
Nish
Fly on your way like an eagle
Fly as high as the sun
On your wings like an eagle
Fly and touch the sun
|
|
|
|
|
Thanks Nish.
|
|
|
|
|
if you are able to write this program please help me:
YOU KNOW THAT THE ISDN NUMBER IS A SPECIFIC NUMBER FOR EACH BOOK,AND FOR EXAMPLE AN ISDN NUMBER LIKE 964-92032-1-4 CONTAINS THIS INFORMATION:
ISDN : TheLanguageOfTheBook-PublisherCode-BookNumber-CheckDigit
the check digit number is calculated in this way,
for example for 964-92032-1-4 :
10x9 + 9x6 + 8x4 + 7x9 + 6x2 + 5x0 + 4x3 + 3x2 + 2x1 = 271
271%11=7 = Result
then the CheckDigit number should be (11-Result)
ok?
Here's the interface of the program:
Enter ISBN: 964-92032-1-4
Language: 964
Publisher: 92032
Book number: 1
Check digit: 4
This ISBN code “964-92032-1-4” is valid!
or
This ISBN code “964-92032-1-4” is invalid!
Please let me know if you understood the program well!thanks again,sorry for the english mistakes found in my text,i'm really sorry!
Khodadad Pakdaman
Pakdaman@CleanMail.it
|
|
|
|
|
You have to first decide why you need to use C++/CLI to write this program. What would your goals be? For that matter, it would be a good idea to decide if you even want to use .NET for the application.
Regards,
Nish
Fly on your way like an eagle
Fly as high as the sun
On your wings like an eagle
Fly and touch the sun
|
|
|
|
|
That'a C++ 6 simple program,i don't want to use .net!ok?
please help me,i'm in need of that program,
thanks again!
|
|
|
|
|
Khodadad Pakdamans wrote: That'a C++ 6 simple program,i don't want to use .net!ok?
Then you are in the wrong forum. This forum is for C++/CLI questions.
Regards,
Nish
Fly on your way like an eagle
Fly as high as the sun
On your wings like an eagle
Fly and touch the sun
|
|
|
|
|
hi... this is my first post here.
can someone provide me with a sample of how to write an array of struct via named pipe?
i am new to named pipe. i have tried writing using the message type mode... however i have not tried using byte mode. moreover, i have an array of struct to write.
thanks in advance for any help!
newbie
|
|
|
|
|
This question should be posted on the Visual C++/MFC board since it doesn't seem to involve
managed C++.
In byte mode you need a pointer to the first struct you want to write. The number of bytes
to write is the sizeof the struct times the number of structs to write.
Which part is giving you trouble?
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Definitely a first post worthy of a 5 vote!
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
hi Mark... thanks and sorry for the wrong post...
can i just continue the thread here and not repost in vc++?
i have done a sample app of writing structs via named pipe... my trouble now is how to properly manage/convert the array of structs to LPVOID which is what i am passing to the named pipe functions (readfile/writefile)... and from LPVOID back to array of structs. or should i use a different data type and not lpvoid?
thanks again!
newbie
|
|
|
|
|
how to change screen resolution to 1024 X 768 in Turbo C++
|
|
|
|
|
First of all, C++ is a useful header for your question only because it gave me a clue that you were totally in the wrong place. 'Change screen resolution', would have been better. 'Change screen resolution in Turbo C++' would be better still, given that almost everyone on this site is using visual studio.
I doubt that Turbo C++ supports Microsoft .NET, which means that the C++/CLI forum is definately the wrong place to ask this 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 )
|
|
|
|
|
Christian Graus wrote: C++ is a useful header for your question only because it gave me a clue that you were totally in the wrong place
Christian Graus wrote: Turbo C++
Haven't worked with that in a long, long time. I know I still have it around here somewheres :->
|
|
|
|
|
You have to include windows.h header. Here is an working example.
#include <stdio.h>
#include <windows.h>
#include <winuser.h>
int main() {
DEVMODE devmode;
devmode.dmPelsWidth = 1024;
devmode.dmPelsHeight = 768;
devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
devmode.dmSize = sizeof(DEVMODE);
long result = ChangeDisplaySettings(&devmode, 0);
return 0;
}
|
|
|
|
|
hai all
can any one help in unit test where i need to test the inheritance, static and dynamic polymorphism
senthil
|
|
|
|
|
Unit test is the wrong terminology. You don't want to test your code, you want to write code that demonstrates polymorphism.
You are also in the wrong forum, you don't need C++/CLI to do this, nor does C++/CLI add any features in this regard. You wanted 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 )
|
|
|
|
|
Hi all,
i want to add in that server program that it will accept only the password from the client if it's "mypassword":
i'm not writing any client program. the client will be the built in linux Telnet program
so the session will be between the server and client as follows
1. telnet 192.11.11.9 password "mypassword".
2.then the server if recieved the password "mypassword" it will connect if not it will close the connection.
I want to know how i can make the server program recognize that the pasword is right or wrong..how i can write it in the server
Thanks
|
|
|
|