Well, my way, there is no individual info method. However, in either case, you should find you're calling it in your original code. If not, perhaps you need to store a pointer instead of a class instance, perhaps it's being downcast by std::list at the moment ?
I am developing an application for WinCE 3.0 for a Pocket PC 2000 device in C++ using MFC / WinAPI.
In my application I use a Bluetooth CF card to communicate with a wireless printer. The drivers installed assign a COM port to the printer so I may
read / write to it using WinAPI calls for Files such as:
The wireless printer conserves battery by automatically turning off after a period of inactivity, so at times I must check to see if it is there before the user tries to print something.
The problem is that if I want to know anything about the file I must first get a handle with the CreateFile( ... ) function, which lags about 10-15 seconds before it times out if the printer is off, so usually the user is already trying to print something by the time I get back from that function call. Or if I make the user wait until I get back, they will get frustrated after so much time.
I tried using
CFile::GetStatus( ... )<br />
but it doesn't seem to work for COM ports, eg. I can call: HANDLE hPrinter = CreateFile( _T("COM4:"),...);
and I get the handle but if I do this: BOOL bIsPortAvailable = CFile::GetStatus( _T("COM4:"), ...);
I get FALSE back;
Is there a way to specify the timeout for the CreateFile( ... ) function or another way to check if that COM port is available?
You could try polling the printer to see when it's off. That way when a user tried to print, the status would already be off unless it just turned off a few seconds before the user tried to print.
I think you might get more responses if this post were moved to the WinCE forum? I've noticed lots and lots of function calls give me major lag on WinCE when they don't on WinXP, so you're more likely to get someone who knows how to solve the problem over there.
Sure. You could use MAPISendMail (PSDK) to send mail from the application. You could easily provide the registration information in your desired format within the message object, and just show the user a read-only copy (out of niceness).
To the same end, there are also third-party add-ins that you can add to your app to handle mail sending.
Remember, though, that if you want to process these incoming registration messages automatically, some SMTP servers change the content of email messages. For example, my office e-mail scans for viruses and adds a line indicating the messages has been scanned for viruses at the bottom of the message.
After reading http://www.codeproject.com/internet/cimapi.asp,
I am able to send email from my application.
However, it got a minor issue.
My email body is about 10 lines with about 200 characters.
I have "\r\n" to separate each line. The AfxMessageBox
displayed the text correctly, 10 separate lines.
But, the mail.Text ( ) concatenated my data to a
huge BIG string.
Just off the top of my head, assuming you want the 4th Wednesday of nMonth in nYear:
1. Create a COleDateTime for the 1st of nMonth in nYear at noon.
2. Use GetDayofWeek to find out what day it is.
3. Determine nOffset, how many days it is 'til the first Wednesday of nMonth.
4. Create a COleDateTimeSpan of (nOffset + 21) days.
5. Add this COleDateTimeSpan to the COleDateTime from step 1.
On the control PC this program does what's expected -- prints the three lines and then hangs (if servername is a valid machine name) or prints two lines and exits with an "Abnormal termination" message (if servername is not valid). On the machine where I'm having trouble, regardless of servername the program will print two lines and then exit with no status message. Could WININET have some kind of corruption? Everything was working fine on this computer until this morning and I can't see what changed in the mean time. I can run ftp from the prompt and establish a connection fine. Any ideas? I am tearing my hair out here.
OK -- now I have uninstalled Dr. Watson on the machine in question and sure enough, when I run the test program, it gets to the GetFtpConnection call and then aborts with "The instruction at "0xaddress" referenced memory at "0xaddress"".
I'm developing an application, Where sound data has to be captured from a pci based "sound card" and the processed data has to again fed back to the sound card so that it can be listened by plugging-in a headphone.
I've used Microsoft Visual C++ 6.0 as a platform and DirectX commands for capturing the soundand processing it.This part(CApturing and processing) works well ,but i'm not able to stream the data back to the card.
Can anyone help me in this or refer to any directx programs which does this kind of an process.
Thank You In Advance
I have an MFC application with a main window and a child window. Since my main window shouldn't have any menu/toolbars, I have to use a button on child window to close the whole application. For example, when I click the close button on the child window it calls the close routine in the main application and the whole application should terminate and exit. But, when i am trying to implement this, I am getting illegal memory reference at the point when I am destroying the main application (sometimes at the point when I destroy the child window).
Anyone have any ideas on this issue. I would also like to know if there is any way to implement this (terminating and exiting the main MFC application from child window).
Try POSTING a WM_CLOSE message to your main application window and see if that helps. I think you are resulting in a crash because you are directly calling the main close function, which is problematic, since your child window is busy processing an existing message (button click). By posting to main window, you decouple the two events and regular processing of close sequence can occur.
Marriage slows down your coding, a baby slows it down even more!
Last Visit: 31-Dec-99 18:00 Last Update: 28-Sep-23 17:00