|
I build an app that scans a computer for active COM ports. I tryed using CreateFile() but it detects only ports from COM1 to COM9.
How can I detect over COM9?
In VC++6 ... if possible
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
How are you using CreateFile, like this?
HANDLE hPort;
WCHAR wszModName[12] = {0};
wsprintf( wszModName, L"\\\\.\\%s", szPort );
hPort = ::CreateFile(wszModName, GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,0,OPEN_EXISTING,0,0);
|
|
|
|
|
Q115831 was the right answer. I used the syntax you mentioned. Thanks.
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
RomTibi wrote: How can I detect over COM9?
By reading MSDN article Q115831.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thanks!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Dammit!
I screwed up the CWinApp class in my copy of "afxwin.h".
(Because I did something dumb.)
I don't have install media, because company policy doesn't allow it.
I can put in a call to get VS reinstalled, but that will take a long time.
Does anybody have a suggestion on how I can restore that file? It's VS 2005.
|
|
|
|
|
Eurosid wrote: I can put in a call to get VS reinstalled, but that will take a long time.
A long time because the folks in IT are not located in the same building as you?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
They aren't even on the same continent any more.
I'm in the US, they're in India. Installs are now
done via Remote Desktop.
It's more efficient that way.
|
|
|
|
|
|
It's seems identical to AfxWin.h from Visual Studio 6.
Thanks for the link, but it doesn't seem to be the right version for 2005.
|
|
|
|
|
Why can't ask one your colleague to send that file to you?
- ns ami -
|
|
|
|
|
I've been struggling with this for a week and a half. Time to ask for help. I have a VC++6.0 / MFC application which "hung-up" when the laptop it was running on suspended operation because of power management. The thing is, I really don't want to loose the data that was entered into the program but not saved. So, I have duplicated the problem on another laptop - all I get is a blank window frame where my program should be. I'm trying to use the Visual Studio debugger to "attach to process" and stop it (break). The call stack shows it's in NTDLL, but I can see my program's code space. How can I find out where my document's data is in memory? Ideally, I'd like to be able to dump it to disk, or even better serialize it. At the very least I'd like to inspect it as a class and manually view member data. Any ideas? Thanks!
|
|
|
|
|
Wouldn't it be easier to just handle the WM_POWER and/or WM_POWERBROADCAST message(s) and save your data accordingly?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
True, but right now the immediate need is to not loose the data from this one instance of the running program. I'll worry about fixing the code later.
Thanks
|
|
|
|
|
I've tried two things, first is a process memory dump called cprocess at http://www.nirsoft.net/utils/cprocess.html[^].
The next is a project here on codeproject at http://www.nirsoft.net/utils/cprocess.html[^].
With a running process, using Mdump from codeproject in the link above, I could use the "find" feature to locate user inputted ascii text in a running process. I've yet to try it in a hung-up process. There's no native dump to file in Mdump, but on its own is useful for locating where in memory text is.
|
|
|
|
|
As you know, within a pe file, there may be a few icons; but the Windows Explorer shows just one of them in order to show the file to the user. Can you tell me please which ICON within a pe file is shown by the Windows Explorer?
Thank you masters!
|
|
|
|
|
Have a look here [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thank you. That's why you're a Gold member and I'm NOT.
Thank you masters!
|
|
|
|
|
Hi,
I'm using Visual Studio 2008 and seem to have a problem with the form designer. I'm new to MFC and want to create a project that allows me to use the form designer. I create a new MFC application form and all the code is created. When I build and run this project, there is a basic window with a few components. However, I can only seem to see the code for this application. Is it possible for my to open this in the form designer and manually edit the form in the editor rather than through code?
Thanks
|
|
|
|
|
If you have the Express Edition then no cookie for you: the visual resource editor is not included.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
Thanks for the reply. I have the professional edition but still no luck
|
|
|
|
|
See [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
In VC2005 (and I guess it is similar with VC2008), you have to open the resource editor. On the left side, you have your solution explorer (which is listing all the files from your project). If you look carefully, you should see tabs at the bottom, click on the one called "Ressource View" (or Ctrl + shift + e). There you should be able to browse and edit your resources.
|
|
|
|
|
Ah, that's perfect, thanks. Would've preferred the easier WinForm methods of having it in the solution, but not complaining
|
|
|
|
|
Hello,
I'm communicating with a logic analyzer (HP 1660A) over RS232. I issue a command which tells the analyzer to print screen its display and send it over to the controller (my pc) through serial communication. I'm saving the result (which is usually abut 25kB) to my computer and I would like to view it as a TIFF or other format. The problem is that the response from the analyzer comes in PCL format, therefore suitable to be sent to a printer and printed directly, but not to be opened as an image. I have tried a few PCL to image converters to do the job, I found one which does it properly, however I've used the trial version and I am reluctant to purchase it. I've given you the background of my labour. I would appreciate any kind of help, a reference to the commands in pcl 1 and what should I do in order to extract the data and format it properly from the PCL file. I have no experience with PCL and image processing whatsoever, so please, give me a hand here. Thank you.
P.S. I've obtained the PCL file from the analyzer, both in C# and matlab... I have one slight problem in C# with the serial port control, some images have some uninterpreted characters in the image, when using the above converters. I say all these because I need an algorithm or some indications, no matter the programming language, so please feel free to post.
|
|
|
|