|
I knew you would help, thanks.
Christian Graus wrote: a good point is to ask in the right forum
just didn't know where to start.
God Bless,
Jason
I am not perfect but I try to be better than those before me.
So those who come after me will be better than I am.
|
|
|
|
|
A lot of people seem to miss the sticky at the top of the forum that explains it, and just not know what the CLI means. I'm only telling you because more people will see your posts in the right forums. This forum is a ghost town, I just come here to redirect people to the right forum, and not many people ask or answer C++/CLI questions.
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 need to close a running exe file from within a c++ program is there any command in c++, i am using borland turbo c++.
|
|
|
|
|
Why the sudden flood of people not using a Microsoft compiler, but asking for help in the forum for Microsoft .NET extensions for C++ ?
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 )
|
|
|
|
|
Christian Graus wrote: Why the sudden flood of people not using a Microsoft compiler, but asking for help in the forum for Microsoft .NET extensions for C++ ?
I noticed that too! I bet the majority of the postings in this forum are non-C++/CLI. I guess they see the C++ of C++/CLI and think it pertains to non-Visual C++ issues. Anyway, they help our posting numbers!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
The forum naming kind of sucks. 'Visual C++' implies the MS compiler, and implies a GUI. Lots of people don't know what CLI is, so they ignore it because they figure this is the place to ask non MFC or non MS compiler questions.
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 have also noticed bookstores don't know how to categorize C, C#, C++ and C++/CLI books. Some bookseller web sites just group some or all together in one category. I guess when people look at these language names, the symbols mysteriously disappearsand they all look the same. I believe this forum is the twilight zone of forums.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
is it possible to check the status of an application(exe file) whether running or not using a c++ program, if it is running i need to close the application, how can i do that?
|
|
|
|
|
You should be posting your questions on the Visual C++/MFC board.
This board is for managed C++.
To find a running application you can use these APIs:
EnumProcesses(), OpenProcess(), GetModuleFileNameEx(), CloseHandle()
I'm not sure how you're going to gracefully force the other app
to close.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Byte b = 10;
Object^ value = b;
BYTE byteValue = (BYTE) value ;
void* pValue = & (byteValue);
|
|
|
|
|
dreamz6480 wrote: Will this code create a memory leak ??
No just a mess
|
|
|
|
|
I wouldn't do it.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi everyone,
We have a VC++ RPC Server developed in VC8 . This server hosts a number of drivers developed as Win32 dlls...
We now have a new requirement, we need this RPC Server to host some dlls developed in c#. Since the RPC Server cannot host C# dlls, we have a developed a intrefacing module developed as a Win32 dll. This dll has a unmanaged section as well as a managed section (developed as ref classes ).... The managed classes will load the c# dlls and handle communication b/w the RPC Server and c# dlls...
In such as scenario, will garbage collection automatically occur????
|
|
|
|
|
dreamz6480 wrote: In such as scenario, will garbage collection automatically occur????
There wouldn't be much point to it if it wasn't automatic
|
|
|
|
|
Yes, garbage collection will occur automatically. However, your problem is what happens to your unmanaged resources when it does occur.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
I want to popup a message, while closing (x) the dialog box.. how to do that.. I am using modeless dialog..can anyone help..
chitra
|
|
|
|
|
overwrite the onsyscomman() in your dialog box.
Greetings from Germany
|
|
|
|
|
I'm having a windows forms application project. On the form there's a datagridview with data of a table out of the datasources. The connectionstring in the datasource is made by the add new datasource wizard and is : Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test\Tabel-XML.mdb
Changing it in the _Tabel_XMLDataset.h file doesn't do anything and changes after a new build.
Now I'd like to know if it's possible to change my data source, so make it variable. I saw something about the use of app.config but how do i have to do this then so that the data source of my datagridview is changed without rebuilding my project it each time after creating a new databaseconnection. I'd like to define the databaseconnection in an external file (like app.config) and then use this databaseconnection for my project. How is this done?
Thanks for helping me out
|
|
|
|
|
hi
I need to call the following function somewhere in a program:
void __fastcall TFormMain::btnUpdateClick(TObject *Sender)
{.....}
This is the event of mouse-click on a button.
How can i call this function in the program itself (which otherwise gets called on 'mouse-click'??
|
|
|
|
|
Does Builder support Microsoft .NET, or are you in the wrong 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 )
|
|
|
|
|
No, BUilder doesnt support Microsoft.NET...it apparently is not a Microsoft product
|
|
|
|
|
Borland do do products that support .NET, I thought. But, if that's not one, 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 )
|
|
|
|
|
I want to create some data classes for my Form but the designer requires the first class be for the form. Is there a cleanest way to add this class to the same document as the form’s design?
Thanks
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Put your data classes in a header file and include it before your Form class. Also, you may need to add some namespace references for it to compile properly.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
I have implementation problems with consumer and procedur. How I can improve this code for good at synchronous communicating?
#include fcntl.h
#include semaphore.h
#include pthread.h
#include stdlib.h
#include stdio.h
#include sys/types.h
#include unistd.h
sem_t *mySemaphore ;
#define BUFFERSIZE 1000000
char boundedBuffer[BUFFERSIZE] ;
int filled = -1 , empty = -1 ;
void Produce(void *data) {
int i = 0 ;
while ( i < BUFFERSIZE ) {
boundedBuffer[++filled] = 'A' ;
i++ ;
}
}
void Consume(void *data) {
int i ;
while ( i < BUFFERSIZE) {
if ( boundedBuffer[++empty] != 'A' )
printf("Error consume != A\n"); ;
i++ ;
}
}
int main(int argc, char * argv[]) {
pthread_t p1, p2 ;
int l = 0 ;
mySemaphore = sem_open("MySemaphore",O_CREAT) ;
for ( l = 0 ; l < BUFFERSIZE; l++) boundedBuffer[l] = '.' ;
/* Create our threads */
pthread_create(&p1, NULL,(void *(*)(void *)) Produce, boundedBuffer);
pthread_create(&p2, NULL,(void *(*)(void *)) Consume, boundedBuffer);
/* Wait for our threads */
pthread_join(p1, NULL);
pthread_join(p2, NULL);
return 0 ;
}
|
|
|
|