|
Can someone please tell me how can I find out the number to which my computer is connected when using a dial-up connection, without using phone-books. I want to monitor a dial-up connection that I haven't initialized in my program so I have to find out its handle first
Thanks
|
|
|
|
|
nemoo wrote:
...without using phone-books.
How else would you do this without looking at the RAS phone book? Once the connection has been established, the number connected to is no longer relevant, thus the TCP/IP layer does not know, or need to know, about it. Call RasEnumConnections() to get the active connections (presumably you have only one), then call RasGetEntryProperties() to get the phone number used.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I've used CreateProcess to start .exe from inside apps before, and they've worked fine. However, I created a service application which starts at boot-up. It cannot seem to use the exact same functions I've used before. Why is this?? Thank you.
|
|
|
|
|
Hard to know for sure but it could be related to the account the service is running in verses the how the process (application) you are starting is installed. For example, if the service is running under the local system account and the application is trying to get values from the HKEY_CURRENT_USER registry keys that is going to break.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
The application that the service is trying to start is one of my own creation. It's a simple console app which does not use any reg keys. Just as a test I called CreateProcess with the notepad.exe inside the service app. Nothing...
|
|
|
|
|
When you say 'boot' do you mean before any user is logged in, while the blue/black screen is up? You might have failure because there is no desktop yet?
I am not so sure that you can launch an 'interactive' application at boot time.
Do you get any meaningul error value from GetLastError?
Your service might need to use CreateProcessAsUser to really get this to work right, if it is going to work at all.
|
|
|
|
|
It may be that the process *is* being created, but you can't see it. A service has it's own desktop, so notepad will be running on that (invisible) desktop. I suggest you use Task Manager to see if the process is running (it will show up in process list in Task Manager even when running on a different desktop).
|
|
|
|
|
The program will probably start, but the service does not run in the same desktop context as you do, so you need to allow it to show stuff on your desktop...
Go to the services settings and check "allow service to interact with desktop"
- Anders
Money talks, but all mine ever says is "Goodbye!"
ShotKeeper, my Photo Album / Organizer Application[^]
My Photos[^]
New developersite: RealDevs.Net
|
|
|
|
|
suppose that u a writting a software to give grading to three different types of student certificate,diplom and degree students,all students will be required to sit for exams which wil be graded as follows:
1-39: F
40-59: D
59-69: C
70-79: B
80-100: A
In addition to that, the Diploma students will be required to attend the 'lab tes' session that awards them 'P'(PASS), 'F'(Fail)or 'X'(ABSENT). The Degree students, on the other hand, need to undergo an 'Industrial Training' that requires the employers to give 'G'(GOOD), 'A'(AVERAGE) or 'P'(POOR).
This program is expedted to be used by the Exam Department that eners student Names and their IC numbers besides the above details. This program should also be able to highlight the highest mark, lowest mark and failure rates for each program. Once the data have been recorded, they shall be stored as a data file for future reference.
Provide a solution to the above requirments using classes, an Object Oriented approach and C++ language.
|
|
|
|
|
Here we go again! Another homework
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I charge $150/hour for a minimum of 4 hours.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
>> I charge $150/hour for a minimum of 4 hours.
Will you wear a dress and take it doggy style?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
|
?? Sorry my glyph translator is in for repair.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
> Re: how to write this program?
I think the best way would be to use a computer and some software.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I think you're supposed to ask that in the Lounge, where the better programmers hang out *mad laughter*
|
|
|
|
|
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
< laughing tears />
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Hello,
i'm developing a chat program. There's a vector of pointers to Dialogs. When i open a chat window, a NEW is called to that dialog, then i call create and showwindow to show the dialog. The windows are deleted when i close the program.
I'm not having trouble with that.
When i close a window, i send a message to the remote client to close the window. The remote client receives this message in a function from the dialog, and there i want to close the dialog (not the remote one):
CVentanaPizarra::OnClose();
CDialog::EndDialog(0);
In the OnClose I have the following:
void CVentanaPizarra::OnClose()
{
CDialog::OnClose();
}
If i don't use EndDialog, the dialog doesn't close. If i use EndDialog, when i want to open the dialog again, the program crashes.
i don't want to delete the memory, just hide the dialog, or close it in some kind of way. i know it works locally, as when i close with the X, then i can open it again, but not when i receive the message.
I searched in msdn, and it says EndDialog is or modal dialogs. So i tried DestroyWindow. I also tried ShowWindow(SW_HIDE) but it doen't work as well.
I'd really appreciate any kind of help you could give me.
Thanks in advance!
|
|
|
|
|
If it is a modeless window - as I understand - then I should go for ShowWindow( SW_HIDE ) . The drawbacks are that you might need to reinitialize controls when showing it again.
Note that first, you create the window with Create . Then you use ShowWindow( SW_SHOW / SW_HIDE ) for all showing and hiding - you don't call Create again.
|
|
|
|
|
ShowWindow will work fine, but keep in mind, the more windows you create (and eventually hide again), the more memory your app will comsume.
A better way would be to destroy the windows if you don't need them again and call delete this; in the PostNcDestroy -function of your dialogs.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hiya
i'm trying to import ~1000 records into a database per transaction (1 transaction per second). I'm thinking that use of a DataSet / DataAdaptor will be a good idea, i.e. create the local DataSet and then commit this to the database. But due to the size of the database, around 1gb, i don't want to do make a local copy of the database every time i want to do an insert (i'm not changing the existing data). Is it possible to make an empty DataSet of the target database table, fill this with inserts, then commit this to database WITHOUT deleting the existing data?
Thanks!
J
|
|
|
|
|
oh, using c++.net, ADO.net and SQLserver2k
j
|
|
|
|
|
Hi all:
I am writing a program where a list of wav files is presented to the user. The user may select one of these files and press a "play" button to hear the contents of their selected file. The problem is that I want to be able to automatically open that wav file in the machine's default application for wav files. For instance, if the user has set up their machine to use Windows Media Player as the default application for wav files, then when they click on my "play" button I would like to invoke WMP and automatically play the file. In fact, the behavior I want to implement is identical to the behavior seen when you double click on a file in Windows Explorer. The file will open inside the default application set for that type of file. Any help you can provide would be greatly appreciated.
Thanks!
|
|
|
|
|
ShellExecute()
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|