|
This is the C++/CLI forum. Borland C++ 4.5 does not do C++/CLI, nor is this snippet using managed extensions. Try the visual C++ forum.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hello,
How can i create an Image object from the standard output , basicly i want to do the following :
1 - redirect the stdout stream to anything else.
2 - create an IStream.
3 - create an Image from the IStream.
Thanks in advance.
A.Barakat
|
|
|
|
|
You'd have to capture the text and draw it onto your bitmap, yourself. There's no stream type that does this for you.
Christian Graus - Microsoft MVP - C++
"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 want insert like this text.mohan's.how can i insert this in sqlserver
|
|
|
|
|
Sounds like a good question for the SQL/ADO/ADO.NET board![^]
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi all,
The other day I developed a small test application in VS2005 CLI and include an ODBC class that I downloaded from CP to be more specific it was this: A set of ODBC Classes[^]
I included it into my project and changed a few setting of the project and everything worked. Untill I ran it on another computer. When I received a "application configuration is incorrect..." so I removed the ODBC class from the project, without changing any of the settings and tried again and this time it ran on the other computer.
Why did this happen ??? Can anyone please help.
Many thanks
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
|
Hi,
I have a dll written in C# that works well when i use it in .net environment. i need to load it from unmanaged code. according to MSDN documents i have used "REGASM /tlb.... " and "GACUTIL /i ..." for calling managed code from unmanaged code. it worked in some of my samples. but unfortunately i have an odd problem now.
i have created an OCX control in VB (not vb.net) an i called some functions of my managed DLL. when the managed function is called, it doesn't works completely well. i mean some of processes in managed code work well but some others don't work well. for example where i use RASCryptoServiceProvider Class it fails. the odd thing is that this dll works perfect when i call it from .net environment.
it has taken a lot of time from me. do you have any advice? HELP!
thanks
ps: there is no data passed between managed and unmanaged code then i thins it is not a subject of marshaling
|
|
|
|
|
This is the managed C++ board. You may want to post this question on the Visual Basic board[^].
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
hi again,
i want to transfer my code from console to form application.
for console:
void main(int argc, char *argv[])
{
//variables here...
}
for form:
btnConnect_Click(System::Object^ sender, System::EventArgs^ e)
{
}
//how to put in the code of argc and argv[]
******************************
to know
everything
is to know
yourself...
|
|
|
|
|
The arguments are passed in to your main method, if they are passed in at all. I thought they were, they sure are long gone by the time you get to a button event.
Christian Graus - Microsoft MVP - C++
"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 have read the article on MSDN about Redistributing Visual C++ Files, but was left wondering whether there isn't another way of compiling ones application (fiddling in the project properties or something) so that it can run on another computer (without having to run any of the Microsoft Visual C++ 2005 Redistributable Packages) ??
Many Thanks
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Sure, try Googling: Fiddle with Project Properties
Seriously though, you can't avoid installing the C Runtime library but most of the others (MFC, ATL, etc.) can be statically linked by "fiddling".
|
|
|
|
|
You can link statically to the dlls, which makes your app bigger, as it will copy them into your exe.
Christian Graus - Microsoft MVP - C++
"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 everyone,
i have a problem, i want to convert string to character array. heres is the scenario:
char *echostring;
char ip[RCVBUFSIZE]; //32
ip =txtIpAdd->Text; //textbox
echostring = ip //<--- cause an error,it says, cannot
convert string to char[32]
thanks in advance,
jeof
******************************
to know
everything
is to know
yourself...
|
|
|
|
|
This normally works for me
char* echostring = (char*)Marshal::StringToHGlobalAnsi(ip).ToPointer();
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
you would have to point to ip[0] or &ip
echostring = ip[0];// << this will make it be the address of the first position[0] of the string same as &ip.
by the way this is for C++.
|
|
|
|
|
echostring = ip;
is fine.
The error is here:
ip = txtIpAdd->Text; //textbox
You can't do that
As programm3r mentioned, something like this should work:
char *echostring;
char ip[RCVBUFSIZE]; //32
const char *chars = (const char *)(void *)Marshal::StringToHGlobalAnsi(txtIpAdd->Text);
strncpy(ip, chars, RCVBUFSIZE);
Marshal::FreeHGlobal(System::IntPtr((void*)chars));
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hello,
I converted VS2003 code to VS2005 (C++, C#).
I try to use DLLs which use: System::Runtime::InteropServices.
Do you know if it is OK? I got runtime error...
Thanks!
|
|
|
|
|
Tal S. wrote: Do you know if it is OK? I got runtime error...
You're not giving us much to work with
I'm going to guess it's not ok, since you get a runtime error.
Does debugging yield any clues?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hello, I work with visual studio 2005, VC++ Managed, I want to carry out a reading of a document .TXT, and to post it in a list view or other, I want by exemle to post that the 10 line 1st. Thank you enormously.
|
|
|
|
|
Have a look at StreamReader class
|
|
|
|
|
Where is the StreamReader class,
Thank you verry mutch.
|
|
|
|
|
In the System.IO namespace
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|