|
Hmm, interesting
At least on 9x/Me it works
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
You can not communicate with ports in NT (4.0,2k,XP,2003,++). That is only done with a device driver..
John
|
|
|
|
|
Greg S. wrote:
Sorry, I don't know, but I'd like to know the answer to your signature
On older OSes and standard keyboards, this disable the keyboard.
But direct access to I/O ports is restricted to drivers on modern OSes.
You can see now why this is a good thing.
Acting as a substitute for God, he becomes a dispenser of justice. - Alexandre Dumas
|
|
|
|
|
thanks for the info!
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi all,
I am trying to debug an MFC application. Dialog Based.
As soon as I reach a breakpoint, neither of my application or MSVC does respond anymore.
The funny thing is if I start my application outside of the IDE, and if an exception is raised then I can enter the debugger without any problem.
Is there anything I can check so that I can understand/fix what is going on ?
Thanks for any help.
Zindine
|
|
|
|
|
What OS are you using? I had that all the time on Win98 and ME. It was fine on Win95, and has been fine on XP. Any NT based OS should be fine. Make sure that you're using the latest service pack (at least SP5).
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hy Ryan,
My OS is Windows 2000 SP3.
How do I know for sure that MSVC 6.0 is updated with SP5 ?
I did apply it but my experience tells me that sometimes some of the files in system32 are overridden by applications.
Added to that, it does it only with that particular application. I did reset all the settings of my project.
I am a bit lost. Never seen that before in 5 years that I am using MSVC 6.0
Thanks for answering anyway.
Zindine
|
|
|
|
|
Yeah, sorry I can't help more. I don't have the problem on WinXP, that I use now, and I've never had 2k. It seems to be OS related though (in my experience), so you might want to check if there are any more SPs available for 2k. I'm not sure what the latest it.
Although, If it only does it for one application, it's wierd. Have you done a rebuild-all? Have you tried restarting the computer? Probably, but just thought I'd check
Others may have more they can say on this
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
it could be the application itself. Here is the obvious stupid questions in case you forgot to check something:
Do you use any unconventional libraries?
Did you try to break the execution by "break all"?
Do you use mix of MT(d), MD(d) libraries?
Do you have custom version of stl libraries?
Could your *.pdb files be out of sink?
Is it possible you have several versions of shared DLL's on your computer?
Did you install Java from Sun on your computer recently? (Rational Rose, Corba, RealTime player)
What is your app actually doing at the time of the problem?
|
|
|
|
|
zindines wrote:
How do I know for sure that MSVC 6.0 is updated with SP5 ?
If you have all of visual studio installed, VB loads with an 'SP5' on the splash screen.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
I need to create a ftp&web virtual directoryfrom my installer which I'm developing now. Does anyone have any C++ example how to do that?
Thanks in advance and regard!
|
|
|
|
|
MSDN articale "IIS Sample ADSI Script to Create FTP Virtual Directories"
Q254808
|
|
|
|
|
|
Hi! everybody:
I'm developing a ActiveX control which is a windowless, If I find something special in my class, I want to SendMessage to this ctrl and let it do something , but I can not get the window handle of this ctrl, so this ctrl also can not get this message.(I have tried AfxGetMainWnd, it doesn't work)
Does anyone has similar experience? Plesae give me some ideas, I'll appreciate
your help.
Ray
|
|
|
|
|
One possible solution is to have the client pass the ActiveX server a handle of its window. Another solution is a callback interface.
Kuphryn
|
|
|
|
|
Thank you for your answer.
But I just wonder which function I can call to get the client handle, I have tried AfxGetMainWnd(tested it in Activex Ctrl test Container, it doesn't work).
Thanks again
Ray
|
|
|
|
|
Hi,
I always thought controls are windows, sometimes invisible.
You can only send messages to windows, even invisible ones (sinks).
One possible way is to use HWND_BROADCAST as window handle. Then every window will get that message. Works well with registered messages, because those are igmored by all but your windows.
The next way would be, to register a message like
MSG_GET_HANDLE ("Hey give me your Handle") and a Message MSG_MYHANDLES ("Here you got it").
So in your ActiveX control, you have a handler for GET_HANDLE and in your application you have a handler for MYHANDLES.
All you have to do, ask all windows to send you their handles. And because only your control understands this message the response will be the handle of your control window. So store the LPARAM as handle of your control handle.
If you really have no window, than you must use THREAD_MESSAGE. But then your ActiveX control must be derived by CCmdTarget I think. Didn't try this one.
Regard
G. Steudtel
|
|
|
|
|
Thank you so much for your answers.
You idea is very good, Could you tell me where I can find some articls about
this, so I can get more detailed reference to save time in this samall but tough thing.
Ray
|
|
|
|
|
I may have missed your point, but why not create a method that you would call when you have that "something special"?
|
|
|
|
|
Okay, I know I have seen this before. But now, when I need it, I can't seem to find it. Any help will be most appreciated.
I have and MDI app with 2 child windows, one of which I would like the users not to be able to close, at least not easily. I would like to disable the [X] button so it won't accidently be hit, but I can't locate an easy way to do it.
I did Google and found a couple of question/answer pages, but the solutions didn't work. They dealt with changing the system menu. Isn't there a style element or something easy?
As I said, any help will be most appreciated.
Thanks,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
do it by Calling SetWindowLong(GWL_STYLE)
Thanx
TAKE CARE
|
|
|
|
|
SetWindowLong? Thanks. What value should I use to disable the close button then?
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
One solution is EnableMenuItem().
GetSystemMenu(FALSE)->EnableMenuItem(SC_CLOSE, MF_DISABLED);
Kuphryn
|
|
|
|
|
The problem I have with this approach is that as a child window, there is no system menu for it, and I get an unhandled exception. This is when I put these statements in the OnCreate handler of the child window.
When I put this in for the main frame, then indeed it does disable the close, but for the main window, not for the child.
Thanks,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
That should work anyways. See the doc for CWnd::GetSystemMenu.
CWnd::GetSystemMenu
CMenu* GetSystemMenu( BOOL bRevert ) const;
Return Value
Identifies a copy of the Control menu if bRevert is FALSE. If bRevert is TRUE, the return value is undefined.
The returned pointer may be temporary and should not be stored for later use.
Parameters
bRevert
Specifies the action to be taken. If bRevert is FALSE, GetSystemMenu returns a handle to a copy of the Control menu currently in use. This copy is initially identical to the Control menu but can be modified. If bRevert is TRUE, GetSystemMenu resets the Control menu back to the default state. The previous, possibly modified, Control menu, if any, is destroyed. The return value is undefined in this case.
Remarks
Allows the application to access the Control menu for copying and modification.
Any window that does not use GetSystemMenu to make its own copy of the Control menu receives the standard Control menu.
The pointer returned by the GetSystemMenu member function can be used with the CMenu::AppendMenu, CMenu::InsertMenu, or CMenu::ModifyMenu functions to change the Control menu.
The Control menu initially contains items identified with various ID values such as SC_CLOSE, SC_MOVE, and SC_SIZE. Items on the Control menu generate WM_SYSCOMMAND messages. All predefined Control-menu items have ID numbers greater than 0xF000. If an application adds items to the Control menu, it should use ID numbers less than F000.
Windows may automatically dim items on the standard Control menu. CWnd can carry out its own checking or dimming by responding to the WM_INITMENU messages, which are sent before any menu is displayed.
John
|
|
|
|