|
|
No. When your application terminates (even without closing the port properly) you will have access to the port. Are you sure you have a COM1 ? You should check with HyperTerminal if you can open the port or not.
EDIT: on a side note, just imagine what would happen if that was true. Can you imagine the mess it would be if, by simply forgetting to close the port, that would break the serial port ?
|
|
|
|
|
Hi,
My VC6 (MFC) project folder contains 60-70 files. I want to put all custom controls and common control class files into a folder and add that folder to my project workspace.
I tried adding a new folder to the "file view" tab and then adding the files to it. But when I debug, I get the error that so-and-so file not found.
Please can you tell me the correct way of doing this?
Thanks,
Tara
|
|
|
|
|
Have you tried this?
Create the folder "common" and put all the classes there with the windows explorer. Then go to "project -> add to project" menu and select the files of the folder.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
I tried it. But sadly it does not work.
Thanks,
Tara
|
|
|
|
|
I am new to this stuff.
I am creating a logging utility. Please help me know what should be included in the initializelog() function. I am also creating a properties file for this from were the initializelog() will read the values. Also what kind of fields should be included in the properties file.
THanks...
|
|
|
|
|
pl_kode wrote: . Please help me know what should be included in the initializelog() function
How would we know that ? what are your requirements ? what are the specifications ?
|
|
|
|
|
pl_kode wrote: Please help me know what should be included in the initializelog() function.
Using my magic eight ball, I foresee initialization-related things going into that function.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
Is there any API exists to convert windows messages such as "WM_CLOSE" into its integer value.
I means when I provide "WM_CLOSE" as a string it should then convert it into its integer value.
Thanks,
Mushq
|
|
|
|
|
Nope, AFAIK. Why do you need it?
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
|
|
|
|
|
CPallini wrote: Why do you need it?
For Readability purpose
Actually I have got dialog based application that contains an edit box for writing "Windows Message”, so that user should provide "WM_CLOSE" as an input to that edit box instead of its integer value.
Regards,
Mushq
|
|
|
|
|
I think you may build a map with the info extracted from the Windows headers.
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
|
|
|
|
|
Why don't you instead populate a list with the different messages the user can send to the window ? This way you can associate yourself the message text ("WM_CLOSE") with its value. And it is more secure in the sense that the user can only enter valid messages.
|
|
|
|
|
HI all experts,
Win32_SerialPort
Win32_SerialPortConfiguration
Win32_SerialPortSetting
I want to use these APIs to get detail information
about ports.but i m fail to use them in correct way.
plz anyone can send me the Sample source code
or procedure of how to use and get my aim.
I also visit the MSDN for more info.. but still confused.
Please Help me..
I m waiting..
THnaks in Advance.....
|
|
|
|
|
Well, I think MSDN [^] is the best resource for.
What does make you confused?
BTW CP [^] is another good resource.
Sorry, it seems I missed the target.
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
modified on Wednesday, April 30, 2008 10:05 AM
|
|
|
|
|
Somesome modified your post .
|
|
|
|
|
It was my double personality, I think. No, wait, I'm not thinking that. Actually, maybe I was just thinking that...
That..., what?
Remember: CPallini abuz...
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
|
|
|
|
|
Man, you are crazy but cool
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Here's one of my excerpts:
hr = pService->CreateInstanceEnum(_bstr_t("Win32_SerialPortConfiguration"), WBEM_FLAG_RETURN_IMMEDIATELY | WBEM_FLAG_FORWARD_ONLY, NULL, &pEnum);
if (WBEM_S_NO_ERROR == hr)
{
hr = pEnum->Next(WBEM_INFINITE, 1, &pClass, &ulReturned);
if (WBEM_S_NO_ERROR == hr)
{
hr = pClass->Get(L"Description", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("Description = %S\n", V_BSTR(&v));
hr = pClass->Get(L"BaudRate", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("BaudRate = %u\n", V_UINT(&v));
hr = pClass->Get(L"BitsPerByte", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("BitsPerByte = %u\n", V_UINT(&v));
hr = pClass->Get(L"Parity", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("Parity = %S\n", V_BSTR(&v));
hr = pClass->Get(L"StopBits", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("StopBits = %S\n", V_BSTR(&v));
pClass->Release()
}
pEnum->Release();
}
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Helo,
I m writing static library win32 static library . I m uisng third party tool dll API .
tell me how I add dll file into my static lib(win32 static lib)
I m using visual c++ 6.0
Regard,
Amit
|
|
|
|
|
I used once a third party dll inside another self-programmed dll.
The third party dll had a *.lib and a *.h files. I included the *.lib into the main Application and the header in MyDll.cpp
If the third party dll has no lib, then I think you should include the header in your cpp and load the dll dinamically into your own dll before using it.
After just include your own lib and header in the main application.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
My project has two modules, one is mfc exe, the other one is a mfc regular dll.
Now I'd like to get the CWinApp* pointer of the exe in a exported function of the dll.
Can I use some kind of AfxGet...App/Module() to do that?
|
|
|
|
|
Hi,
U can use AfxGetApp to get a pointer to the Main application
thanks,
Nitheesh
|
|
|
|
|
Hi,
How to track the key "windows+d" preseed in my application?
|
|
|
|
|
What about a keyboard hook?
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
|
|
|
|